This commit is contained in:
2025-11-14 09:37:35 -08:00
parent 7a9cd2f70e
commit 3593d8cbd2
11 changed files with 5 additions and 4 deletions

View File

@@ -45,8 +45,8 @@
* @brief Configuration of the Cortex-M4 Processor and Core Peripherals * @brief Configuration of the Cortex-M4 Processor and Core Peripherals
*/ */
#define __CM4_REV 0x0001U /*!< Cortex-M4 revision r0p1 */ #define __CM4_REV 0x0001U /*!< Cortex-M4 revision r0p1 */
#define __MPU_PRESENT 1U /*!< STM32L4XX provides an MPU */ #define __MPU_PRESENT 1U /*!< STM32L4xx provides an MPU */
#define __NVIC_PRIO_BITS 4U /*!< STM32L4XX uses 4 Bits for the Priority Levels */ #define __NVIC_PRIO_BITS 4U /*!< STM32L4xx uses 4 Bits for the Priority Levels */
#define __Vendor_SysTickConfig 0U /*!< Set to 1 if different SysTick Config is used */ #define __Vendor_SysTickConfig 0U /*!< Set to 1 if different SysTick Config is used */
#define __FPU_PRESENT 1U /*!< FPU present */ #define __FPU_PRESENT 1U /*!< FPU present */
@@ -59,7 +59,7 @@
*/ */
/** /**
* @brief STM32L4XX Interrupt Number Definition, according to the selected device * @brief STM32L4xx Interrupt Number Definition, according to the selected device
* in @ref Library_configuration_section * in @ref Library_configuration_section
*/ */
typedef enum typedef enum

View File

@@ -104,7 +104,7 @@ void calibrateThresholds(){
// Read every channel once and set threshold to 80% of reading // Read every channel once and set threshold to 80% of reading
for(int i = 0; i < NUM_CHANNELS; i++){ for(int i = 0; i < NUM_CHANNELS; i++){
uint16_t sensorVal = vals[i]; uint16_t sensorVal = (vals[i] * 3) / 5;
if(sensorVal < 50){ if(sensorVal < 50){
sensorVal = 0; sensorVal = 0;
@@ -244,6 +244,7 @@ int main() {
areSensorRequirementsMetCurrent = true; areSensorRequirementsMetCurrent = true;
areSensorRequirementsMetPrevious = true; areSensorRequirementsMetPrevious = true;
SHAL_TIM15.stop();
stopBeeping(); stopBeeping();
} }