Skip to content

Commit

Permalink
Prevent MSP from hogging the CPU.
Browse files Browse the repository at this point in the history
  • Loading branch information
hydra committed Dec 26, 2014
1 parent 916aa60 commit e7cac19
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/io/serial_msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ static bool processOutCommand(uint8_t cmdMSP)
break;
case MSP_RAW_IMU:
headSerialReply(18);
// Retarded hack until multiwiidorks start using real units for sensor data
// Hack due to choice of units for sensor data in multiwii
if (acc_1G > 1024) {
for (i = 0; i < 3; i++)
serialize16(accSmooth[i] / 8);
Expand Down Expand Up @@ -982,7 +982,7 @@ static bool processOutCommand(uint8_t cmdMSP)
serialize8(GPS_svinfo_svid[i]);
serialize8(GPS_svinfo_quality[i]);
serialize8(GPS_svinfo_cno[i]);
}
}
break;
#endif
case MSP_DEBUG:
Expand Down Expand Up @@ -1469,6 +1469,7 @@ static void mspProcessPort(void)
tailSerialReply();
}
currentPort->c_state = IDLE;
break; // process one command so as not to block.
}
}
}
Expand Down

0 comments on commit e7cac19

Please sign in to comment.