mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Pull out more QC hooks
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
*/
|
||||
#include "BSP.h"
|
||||
#include "Pins.h"
|
||||
#include "QC3.h"
|
||||
#include "Settings.h"
|
||||
#include "stm32f1xx_hal.h"
|
||||
void QC_DPlusZero_Six() {
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET); // pull down D+
|
||||
@@ -63,3 +65,10 @@ void QC_Post_Probe_En() {
|
||||
}
|
||||
|
||||
uint8_t QC_DM_PulledDown() { return HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_11) == GPIO_PIN_RESET ? 1 : 0; }
|
||||
|
||||
void QC_resync() {
|
||||
#ifdef MODEL_TS80
|
||||
seekQC((systemSettings.cutoutSetting) ? 120 : 90,
|
||||
systemSettings.voltageDiv); // Run the QC seek again if we have drifted too much
|
||||
#endif
|
||||
}
|
||||
23
workspace/TS100/Core/BSP/Miniware/postRTOS.cpp
Normal file
23
workspace/TS100/Core/BSP/Miniware/postRTOS.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "BSP.h"
|
||||
#include "FreeRTOS.h"
|
||||
#include "QC3.h"
|
||||
#include "Settings.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "main.hpp"
|
||||
#include "power.hpp"
|
||||
#include "stdlib.h"
|
||||
#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
|
||||
}
|
||||
Reference in New Issue
Block a user