mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
add getCoreTemp (#12608)
* add getCoreTemp * add ifdef * Update msp.c Now also repported from MSP_STATUS * Update src/main/msp/msp.c Co-authored-by: Míguel Ángel Mulero Martínez <mcgivergim@gmail.com> --------- Co-authored-by: Míguel Ángel Mulero Martínez <mcgivergim@gmail.com>
This commit is contained in:
parent
e195bf7717
commit
2878ad4e72
2 changed files with 10 additions and 1 deletions
|
@ -138,6 +138,7 @@
|
|||
#include "scheduler/scheduler.h"
|
||||
|
||||
#include "sensors/acceleration.h"
|
||||
#include "sensors/adcinternal.h"
|
||||
#include "sensors/barometer.h"
|
||||
#include "sensors/battery.h"
|
||||
#include "sensors/boardalignment.h"
|
||||
|
@ -1116,6 +1117,14 @@ static bool mspProcessOutCommand(mspDescriptor_t srcDesc, int16_t cmdMSP, sbuf_t
|
|||
// config state flags - bits to indicate the state of the configuration, reboot required, etc.
|
||||
// other flags can be added as needed
|
||||
sbufWriteU8(dst, (getRebootRequired() << 0));
|
||||
|
||||
// Added in API version 1.46
|
||||
// Write CPU temp
|
||||
#ifdef USE_ADC_INTERNAL
|
||||
sbufWriteU16(dst, getCoreTemperatureCelsius());
|
||||
#else
|
||||
sbufWriteU16(dst, 0);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue