500,7 → 500,7 |
request_PPMChannels = TRUE; |
break; |
|
case 'i':// IMU configuration |
case 'i':// Read IMU configuration |
tempchar[0] = IMUCONFIG_REVISION; |
tempchar[1] = sizeof(IMUConfig); |
while (!txd_complete) |
508,6 → 508,22 |
sendOutData('I', FC_ADDRESS, 2, &tempchar, 2, (uint8_t *) &IMUConfig, sizeof(IMUConfig)); |
break; |
|
case 'j':// Save IMU configuration |
if (!(MKFlags & MKFLAG_MOTOR_RUN)) // save settings only if motors are off |
{ |
if ((pRxData[0] == IMUCONFIG_REVISION) && (pRxData[1] == sizeof(IMUConfig))) { |
memcpy(&IMUConfig, (uint8_t*) &pRxData[2], sizeof(IMUConfig)); |
IMUConfig_writeToEEprom(); |
tempchar[0] = 1; //indicate ok data |
} else { |
tempchar[0] = 0; //indicate bad data |
} |
while (!txd_complete) |
; // wait for previous frame to be sent |
sendOutData('J', FC_ADDRESS, 1, &tempchar, 1); |
} |
break; |
|
case 'q':// request settings |
if (pRxData[0] == 0xFF) { |
pRxData[0] = getParamByte(PID_ACTIVE_SET); |