![]() |
Battery Voltage variable on EDU controller
I am trying to use the battery_voltage variable in user_routines.c but I get this error when trying to compile..
Error [1205] unknown member 'rc_analog01' in '__tag_167' Am I missing something? EDIT After looking at 'ifi_default.h' i found this block of code.. Code:
unsigned char oi_analog01, oi_analog02, oi_analog03, oi_analog04; /*rxdata.oi_analog01*/If found that if you took rxdata.rc_main_batt and applied the formula "current voltage = battery_voltage * 0.038 + 0.05; " found at the bottom of 'ifi_aliases.h' you get a value of 650.. im running the the controller off a wall adapter putting out 6 volts to i think this is pretty acurate. Here is the code if anyone is interested.. Code:
float current_voltage = 0;EDIT I just tried using current_voltage = rxdata.oi_analog01; and i get averages of 4.7 so im not sure what to think now.. can anyone clarify as to what one it is and why i get an error when i try to use the 'battery_voltage' aliase... also i just realized that the battery_voltage aliase points to 'rxdata.rc_analog01' which i cant seem to even find anywhere.. |
Re: Battery Voltage variable on EDU controller
Are you using the EDU header files? For those two fields (rc_*_batt), I have "res01" and "res02".
In ifi_aliases.h (EDU version), it has this macro: Code:
/* |
Re: Battery Voltage variable on EDU controller
Yeah im sure im using the right header files... i got it off the ifi website three days ago from this URL http://www.ifirobotics.com/mini-rc-read-me.shtml
Has there been an update or something? |
| All times are GMT -5. The time now is 03:19. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi