1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 11:59:58 +03:00

Internal ADC support, full task polling version

This commit is contained in:
jflyper 2017-12-31 19:12:05 +09:00
parent 5a448ea9b0
commit a03b85025c
16 changed files with 321 additions and 42 deletions

View file

@ -130,6 +130,7 @@ extern uint8_t __config_end;
#include "scheduler/scheduler.h"
#include "sensors/acceleration.h"
#include "sensors/adcinternal.h"
#include "sensors/barometer.h"
#include "sensors/battery.h"
#include "sensors/boardalignment.h"
@ -3011,6 +3012,12 @@ static void cliStatus(char *cmdline)
cliPrintf("CPU Clock=%dMHz", (SystemCoreClock / 1000000));
#ifdef USE_ADC_INTERNAL
uint16_t vrefintMv = getVrefMv();
uint16_t coretemp = getCoreTemperatureCelsius();
cliPrintf(", Vref=%d.%2dV, Core temp=%ddegC", vrefintMv / 1000, (vrefintMv % 1000) / 10, coretemp);
#endif
#if defined(USE_SENSOR_NAMES)
const uint32_t detectedSensorsMask = sensorsMask();
for (uint32_t i = 0; ; i++) {