Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
SerialOutputLogger.cpp
00001 #include "Misc/SerialOutputLogger.h" 00002 00003 SerialOutputLogger::SerialOutputLogger(Serial *serialPort, IMU_RegisterDataBuffer_t *imuRegisterDataBuffer, RadioDecoder_RegisterDataBuffer_t *radioDecoderRegisterDataBuffer) { 00004 this->serialPort = serialPort; 00005 this->imuRegisterDataBuffer = imuRegisterDataBuffer; 00006 this->radioDecoderRegisterDataBuffer = radioDecoderRegisterDataBuffer; 00007 } 00008 00009 void SerialOutputLogger::writeRadioDecoderDataLog(bool csv) { 00010 if (csv) { 00011 for(uint8_t i=0; i<3; i++) { 00012 serialPort->printf("%d, ", radioDecoderRegisterDataBuffer->channelValid[i]); 00013 serialPort->printf("%d, ", radioDecoderRegisterDataBuffer->channelActiveTime[i]); 00014 if (i == 2) { 00015 serialPort->printf("%d\r\n", radioDecoderRegisterDataBuffer->channelPercent[i]); 00016 } 00017 } 00018 } else { 00019 for(uint8_t i=0; i<3; i++) { 00020 serialPort->printf("RadioDecoder - Ch[%d] Valid: %d\r\n",i,radioDecoderRegisterDataBuffer->channelValid[i]); 00021 serialPort->printf("RadioDecoder - Ch[%d] ActiveTime: %d\r\n",i,radioDecoderRegisterDataBuffer->channelActiveTime[i]); 00022 serialPort->printf("RadioDecoder - Ch[%d] Percentage: %d\r\n\r\n",i,radioDecoderRegisterDataBuffer->channelPercent[i]); 00023 } 00024 } 00025 } 00026 00027 00028 void SerialOutputLogger::writeImuDataLog(bool csv) { 00029 if (csv) { 00030 00031 } else { 00032 00033 } 00034 }
Generated on Thu Jul 28 2022 08:08:43 by
1.7.2