mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-07 00:53:41 +08:00
[mf_daq] hard code dl_buffer extraction
macros for reading are not produced anymore for telemetry class
This commit is contained in:
@@ -115,11 +115,12 @@ void mf_daq_send_report(void)
|
||||
|
||||
void parse_mf_daq_msg(void)
|
||||
{
|
||||
mf_daq.nb = DL_PAYLOAD_FLOAT_values_length(dl_buffer);
|
||||
mf_daq.nb = dl_buffer[2];
|
||||
if (mf_daq.nb > 0) {
|
||||
if (mf_daq.nb > MF_DAQ_SIZE) { mf_daq.nb = MF_DAQ_SIZE; }
|
||||
// Store data struct directly from dl_buffer
|
||||
memcpy(mf_daq.values, DL_PAYLOAD_FLOAT_values(dl_buffer), mf_daq.nb * sizeof(float));
|
||||
float *buf = (float*)(dl_buffer+3);
|
||||
memcpy(mf_daq.values, buf, mf_daq.nb * sizeof(float));
|
||||
// Log on SD card
|
||||
if (log_started) {
|
||||
DOWNLINK_SEND_PAYLOAD_FLOAT(pprzlog_tp, chibios_sdlog, mf_daq.nb, mf_daq.values);
|
||||
|
||||
Reference in New Issue
Block a user