This simplifies code sharing between ArduCopter and Arduplane at the expense of 48bytes.
Moved CH_x defines out of the defines.h file and into the library where they belong
This reverts commit a65a2dda2c1bfa95437880227a3abddc95b329f5.
I am reverting this not for any sane reason, but because my 3 APM
boards now lock up on any I2C operation, and I don't know why. I can't
see how this change could have caused it, but I don't want to take the
chance.
This reverts commit a65a2dda2c1bfa95437880227a3abddc95b329f5.
I am reverting this not for any sane reason, but because my 3 APM
boards now lock up on any I2C operation, and I don't know why. I can't
see how this change could have caused it, but I don't want to take the
chance.
space() was actually intended to be tx buffer space, it just had a
bug. The name txspace() is clearer however, and should prevent
confusion as to which buffer its for
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3247 f9c3cf11-9bcb-44bc-f272-b75c42450872
this makes mavlink_message_t much smaller, but setting
MAVLINK_MAX_PAYLOAD_LEN to the maximum message size in this
dialect. This saves us 320 bytes of memory
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3239 f9c3cf11-9bcb-44bc-f272-b75c42450872
This adds a variable length dummy variable at the front of the EEPROM
when we erase it, which has the effect of moving the location of any
hot variables within the EEPROM. This should improve EEPROM
life. Thanks to Mike for the implementation.
Pair-Programmed-With: Mike Smith
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3234 f9c3cf11-9bcb-44bc-f272-b75c42450872
when saving a variable, this avoids EEPROM wear by checking if the
existing value is already the same as the value being written, and
avoiding the write.
Thanks to Mike Smith for the implementation
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3233 f9c3cf11-9bcb-44bc-f272-b75c42450872
We were using && instead of & for a bit check. Thanks to Mike for
spotting this!
Pair-Programmed-With: Mike Smith
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3232 f9c3cf11-9bcb-44bc-f272-b75c42450872
This wipes all parameter values, and also clears out any waypoints as
the waypoint format could have changed between firmware revisions.
This also ensures that the AP_Var code can't re-use any key values
from the old EEPROM state, which makes us less dependent on the old
EEPROM being in a good state
Pair-Programmed-With: Mike Smith
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3231 f9c3cf11-9bcb-44bc-f272-b75c42450872
this new implementation reduces code size, and also reduces stack
usage, while avoiding the gcc union stack bug
Note that we will gain even more when we move to the new protocol
version, especially in terms of code size
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3200 f9c3cf11-9bcb-44bc-f272-b75c42450872