1) the 2 extra servos were not used for anything, yet.
2) the MSP packet to set ALL the servo configurations in one go is
larger than the MSP input buffer size.
Likely the MSP_SET_SERVO_CONF should be updated with command that takes
an index of a servo to configure, as per mode ranges/colors/leds/etc.
Fixes#1002
Newlib's strtok() allocates memory and causes malloc() to be linked
in. Use the reentrant version instead.
Saves 336 bytes.
Signed-off-by: Michael Hope <mlhx@google.com>
Add 'f' suffixes to some constants so they don't get silently promoted
to double. Use roundf() instead of round().
Saves 208 bytes of flash.
Signed-off-by: Michael Hope <mlhx@google.com>
G++ supports a more limited version of designated initialisers.
Reorder fields to be in the right order. Make nested initialisers
explicit.
Signed-off-by: Michael Hope <mlhx@google.com>
Remove duplicate consts.
Pull in the include files where functions and variables are declared.
Mark file local but duplicated variables as static.
Mark some variable declarations as extern.
Remove duplicated variable definition.
Signed-off-by: Michael Hope <mlhx@google.com>
This is done to make it clearer in configuration dumps which ports are
enabled and configured.
There is a nice code size reduction due to less strings being needed.
Serial documentation updated.
Closes#966.
This primarily is to avaoid stalling the main loop when beeping and
flashing.
This is needed because oneshot ESCs do not receive updates when the main
loop is stalled.
Additionally the beeper code for sticks held in disarm position is
changed since it also clashed with profile selection. Now profile
selections can be seen and heard clearly.
Other subsections of the system that changed the LED0 state while the
main loop is running have been updated to use the status indicator API
instead of blindly hitting the hardware which previously caused lots of
odd LED flashing behaviour - now it is consistent.
Use C++11 for the C++ unit test code to make the tests easier to read.
Previously we were using a 17 year old standard (!) (g++98)
GoogleTest is compiled with some additional flags to avoid some specific
warnings. Consider enabling the warnings when upgrading GoogleTest.
See https://code.google.com/p/googletest/issues/detail?id=433Closes#941
This also ensures that the PWM mapping does not use the sonar pins when
sonar is enabled in a board agnostic way.
Conflicts:
src/main/config/config.c
src/main/drivers/pwm_mapping.h
src/main/main.c
src/main/target/CC3D/target.h