Remove blink and SOS

This commit is contained in:
Armel FAUVEAU
2024-03-21 03:16:34 +01:00
parent b9ecbc48e4
commit 7ed9889ef4
4 changed files with 79 additions and 58 deletions

View File

@@ -210,7 +210,7 @@ ifeq ($(ENABLE_FEAT_F4HWN),1)
VERSION_STRING_1 ?= v0.22
AUTHOR_STRING_2 ?= F4HWN
VERSION_STRING_2 ?= v2.3
VERSION_STRING_2 ?= v2.4
AUTHOR_STRING ?= $(AUTHOR_STRING_1)+$(AUTHOR_STRING_2)
VERSION_STRING ?= $(VERSION_STRING_2)

View File

@@ -1303,9 +1303,11 @@ void APP_TimeSlice10ms(void)
return;
#endif
#ifndef ENABLE_FEAT_F4HWN
#ifdef ENABLE_FLASHLIGHT
FlashlightTimeSlice();
#endif
#endif
#ifdef ENABLE_VOX
if (gVoxResumeCountdown > 0)

View File

@@ -5,6 +5,7 @@
#include "flashlight.h"
#ifndef ENABLE_FEAT_F4HWN
enum FlashlightMode_t gFlashLightState;
void FlashlightTimeSlice()
@@ -62,5 +63,21 @@ void ACTION_FlashLight(void)
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
}
}
#else
void ACTION_FlashLight(void)
{
static bool gFlashLightState = false;
if(gFlashLightState)
{
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
}
else
{
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
}
gFlashLightState = (gFlashLightState) ? false : true;
}
#endif
#endif

View File

@@ -5,6 +5,7 @@
#include <stdint.h>
#ifndef ENABLE_FEAT_F4HWN
enum FlashlightMode_t {
FLASHLIGHT_OFF = 0,
FLASHLIGHT_ON,
@@ -16,6 +17,7 @@ extern enum FlashlightMode_t gFlashLightState;
extern volatile uint16_t gFlashLightBlinkCounter;
void FlashlightTimeSlice(void);
#endif
void ACTION_FlashLight(void);
#endif