Closed GoogleCodeExporter closed 8 years ago
I can confirm this problem. The reason is that the function read_current(); is
not being called in the medium_loop. After commenting the "if
(g.current_enabled)" statement in "ArduPilotMega.pde" file, the values in the
log seem to be alright.
Original comment by el_andre...@hotmail.com
on 28 Mar 2011 at 8:16
The sensor is disabled by default in Paramters.h:
[...]
current_enabled (DISABLED, k_param_current, PSTR("CURRENT_ENABLE")),
[...]
Best way would be to use a define in config.h such as:
#ifndef CURRENT_SENSOR
#define CURRENT_SENSOR DISABLED
#endif
In Parameters.h use:
[...]
current_enabled (CURRENT_SENSOR,k_param_current,PSTR("CURRENT_ENABLE")),
[...]
And the user configures the sensor in APM-Config.h by defining:
#define CURRENT_SENSOR ENABLED
All current logging code, including the variable definition, could be enclosed
in
#if CURRENT_SENSOR == ENABLED
do sume CURRENT stuff....
#endif
This would reduce code size for the people that do not want a current sensor at
all.
Original comment by el_andre...@hotmail.com
on 29 Mar 2011 at 7:02
Guys, the current sensor implementation IS incomplete. There are bits of it
copied over from ACM, but I do not have a current sensor so have not tried to
get it complete yet. I consider it an unsupported feature for 2.0.
That said, it will get done some day ;)
Original comment by dewei...@gmail.com
on 2 Apr 2011 at 1:31
I have a spare current sensor and can mail it to you if that would help -
please contact me at giantkillerrobot-at-gmail.com
Original comment by giantkil...@gmail.com
on 3 Apr 2011 at 4:38
I have made significant changes and corrections here. Please read the comment
for issue 294 carefully as you will need to change a bit of configuration.
Should be good to go, although I have not tested it yet.
GKR - got the sensor. The SparkFun AVC is this Saturday, and that has my full
attention for another 72 hours or so, then I will test this with hardware.
Many thanks...
Original comment by dewei...@gmail.com
on 21 Apr 2011 at 3:53
Sorry, I meant issue 298.
Original comment by dewei...@gmail.com
on 21 Apr 2011 at 3:54
Original issue reported on code.google.com by
petebir...@gmail.com
on 28 Mar 2011 at 2:05