1
0
forked from me/IronOS

Clean up power calls

This commit is contained in:
Ben V. Brown
2020-05-30 12:43:32 +10:00
parent 5bb85a4a32
commit 05b43dfa1c
5 changed files with 52 additions and 12 deletions

View File

@@ -0,0 +1,20 @@
#include "BSP.h"
#include "BSP_Power.h"
#include "QC3.h"
void power_probe() {
// If TS80 probe for QC
// If TS100 - noop
#ifdef MODEL_TS80
startQC(systemSettings.voltageDiv);
seekQC((systemSettings.cutoutSetting) ? 120 : 90,
systemSettings.voltageDiv); // this will move the QC output to the preferred voltage to start with
#endif
}
void power_check() {
#ifdef MODEL_TS80
QC_resync();
#endif
}

View File

@@ -9,15 +9,5 @@
#include "task.h"
void postRToSInit() {
#ifdef MODEL_TS80
startQC(systemSettings.voltageDiv);
while (pidTaskNotification == 0) osDelay(30); // Wait for PID to start
seekQC((systemSettings.cutoutSetting) ? 120 : 90,
systemSettings.voltageDiv); // this will move the QC output to the preferred voltage to start with
#else
while (pidTaskNotification == 0) osDelay(30); // Wait for PID to start
osDelay(200); // wait for accelerometer to stabilize
#endif
// Any after RTos setup
}