1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

add MSP_ANALOG support to logger

This commit is contained in:
cTn 2014-06-20 11:55:14 +02:00
parent 211bd5b89e
commit 19de1e8040
2 changed files with 13 additions and 0 deletions

View file

@ -7,6 +7,7 @@
<dt><label><input type="checkbox" name="MSP_ATTITUDE" /> MSP_ATTITUDE</label></dt><dd>3 columns (x, y, z)</dd> <dt><label><input type="checkbox" name="MSP_ATTITUDE" /> MSP_ATTITUDE</label></dt><dd>3 columns (x, y, z)</dd>
<dt><label><input type="checkbox" name="MSP_ALTITUDE" /> MSP_ALTITUDE</label></dt><dd>one column</dd> <dt><label><input type="checkbox" name="MSP_ALTITUDE" /> MSP_ALTITUDE</label></dt><dd>one column</dd>
<dt><label><input type="checkbox" name="MSP_RAW_GPS" /> MSP_RAW_GPS</label></dt><dd>7 columns</dd> <dt><label><input type="checkbox" name="MSP_RAW_GPS" /> MSP_RAW_GPS</label></dt><dd>7 columns</dd>
<dt><label><input type="checkbox" name="MSP_ANALOG" /> MSP_ANALOG</label></dt><dd>4 columns</dd>
<dt><label><input type="checkbox" name="MSP_RC" /> MSP_RC</label></dt><dd>8 columns by default</dd> <dt><label><input type="checkbox" name="MSP_RC" /> MSP_RC</label></dt><dd>8 columns by default</dd>
<dt><label><input type="checkbox" name="MSP_MOTOR" /> MSP_MOTOR</label></dt><dd>8 columns by default</dd> <dt><label><input type="checkbox" name="MSP_MOTOR" /> MSP_MOTOR</label></dt><dd>8 columns by default</dd>
<dt><label><input type="checkbox" name="MSP_DEBUG" /> MSP_DEBUG</label></dt><dd>4 columns</dd> <dt><label><input type="checkbox" name="MSP_DEBUG" /> MSP_DEBUG</label></dt><dd>4 columns</dd>

View file

@ -167,6 +167,12 @@ function tab_initialize_logging() {
sample += ',' + GPS_DATA.speed; sample += ',' + GPS_DATA.speed;
sample += ',' + GPS_DATA.ground_course; sample += ',' + GPS_DATA.ground_course;
break; break;
case 'MSP_ANALOG':
sample += ',' + ANALOG.voltage;
sample += ',' + ANALOG.amperage;
sample += ',' + ANALOG.mAhdrawn;
sample += ',' + ANALOG.rssi;
break;
case 'MSP_RC': case 'MSP_RC':
for (var chan = 0; chan < RC.active_channels; chan++) { for (var chan = 0; chan < RC.active_channels; chan++) {
sample += ',' + RC.channels[chan]; sample += ',' + RC.channels[chan];
@ -219,6 +225,12 @@ function tab_initialize_logging() {
head += ',' + 'gpsSpeed'; head += ',' + 'gpsSpeed';
head += ',' + 'gpsGroundCourse'; head += ',' + 'gpsGroundCourse';
break; break;
case 'MSP_ANALOG':
head += ',' + 'voltage';
head += ',' + 'amperage';
head += ',' + 'mAhdrawn';
head += ',' + 'rssi';
break;
case 'MSP_RC': case 'MSP_RC':
for (var chan = 0; chan < RC.active_channels; chan++) { for (var chan = 0; chan < RC.active_channels; chan++) {
head += ',' + 'RC' + chan; head += ',' + 'RC' + chan;