There's a number of changes in this commit, all related.
Improved efficiency of preparing HoTT messages.
All HoTT message data is no-longer reset each time, going forward old
data is re-used unless it is updated. This should help with GPS
co-ordinates too since they were erased from subsequent responses when
ideally the last-known co-ordinates should be transmitted each time.
The previous update was sending one too many bytes due to the
aligned/padded uint16_t values in the HoTT data structures. There were
two solutions, use #pragma to pack the structure or avoid larger types
in the structures, the latter made sense and results in more portable
code since it's a wire format.
Updated HoTT structures to use latest message structure from Ardupilot.
Currently the variables are in underscore_format, that will likely
change in future.
Cleaned up and deleted old ported code that was #ifdef'd out. Some test
code still remains for now. This will be deleted in due course.
Introduced bitmask for EAM alarm flags.
Corrected documentation.
This should be flyable now, the previous implementation would block
while calculating data and transmitting.
This implementation calculates packets on a 50hz schedule and transmits
data as close to the transmission spec as it can. It's still possible
for other long-running code to interfere with the data transmission. A
solution would perhaps be to use a timer/irq for the transmission
instead.
There is some cleanup to do still but this needs to be in the hands of
testers for early feedback.
own dedicated serial port.
Added a feature to enable/disable RX_MSP.
Renamed feature SERIALRX to RX_SERIAL.
Renamed feature PARALLEL_PWM to RX_PARALLEL_PWM
Renamed PPM to RX_PPM.
Update serial configuration checking to better support Serial RX and
telemetry by verifiying serial port features and supported baud rates.
It's now possible to use a low-speed serial rx provider via softserial -
only problem is all the current serial rx providers are 100000/115200
baud. The code changes however open the door for using serial rx and
any capable serial port such as uart3-5 on the STM32F30x
It's also now possible to use GPS at low speeds on software serial
ports.
Currently port usage is hard-coded to the default port layout, cli
commands are coming in a future commit.
This decouples all code from the global 'serialPorts' structure which
has been removed. Any code that needs to use a serial port can use
findOpenSerialPort() and openSerialPort() and maintain it's own
reference to the port.
Ports can switch between functions. e.g. by default
cli/msp/telemetry/gps
passthrough all use USART1. Each port maintains it's current function.
see begin/endSerialPortFunction.
There are only certain combinations of serial port functions that are
supported, these are listed in serialPortFunctionScenario_e.
This commit also adds a few 'static' keywords to variables that should
have been.
There a a few other minor fixes and tweaks to various bits of code that
this uncovered too.
Keil project not updated, I have no way to verify it.
Note, mw.c, drv_pwm.c and drv_system.c contain code for too many topics.
Later commits will relocate the code as appropriate.
Not even looked at utils yet. 'Utils' is a bad naming practice and is a
synonym for 'too lazy to find the right file/name'.
Update software serial to support RX, TX or RX&TX modes. Update serial
API to allow on-the-fly changing of serial port mode. Update HoTT to
change serial port mode when transmitting.
HoTT packet structures, checksum is always sent by the response sending
code. Reduce ram usage by 173+ bytes. Corrected accreditations.
Updating documentation to match code. Replaced comments that commented
out code with #ifdef blocks because commented out code is not found by
refactoring tools.