Apply my changes v1
Some checks failed
Build Firmware / build (push) Failing after 3m21s

This commit is contained in:
2025-02-27 16:49:04 +01:00
parent ba5257f2f6
commit f4ff2e6048
37 changed files with 3890 additions and 4607 deletions

View File

@@ -36,7 +36,7 @@
#include "screenshot.h"
#endif
static const uint16_t Obfuscation[8] = { 0x6C16, 0xE614, 0x912E, 0x400D, 0x3521, 0x40D5, 0x0313, 0x80E9 };
static const uint16_t Obfuscation[8] = {0x6C16, 0xE614, 0x912E, 0x400D, 0x3521, 0x40D5, 0x0313, 0x80E9};
AIRCOPY_State_t gAircopyState;
uint16_t gAirCopyBlockNumber;
@@ -45,16 +45,13 @@ uint8_t gAirCopyIsSendMode;
uint16_t g_FSK_Buffer[36];
static void AIRCOPY_clear()
{
for (uint8_t i = 0; i < 15; i++)
{
static void AIRCOPY_clear() {
for (uint8_t i = 0; i < 15; i++) {
crc[i] = 0;
}
}
bool AIRCOPY_SendMessage(void)
{
bool AIRCOPY_SendMessage(void) {
static uint8_t gAircopySendCountdown = 1;
if (gAircopyState != AIRCOPY_TRANSFER) {
@@ -77,9 +74,9 @@ bool AIRCOPY_SendMessage(void)
if (++gAirCopyBlockNumber >= 0x78) {
gAircopyState = AIRCOPY_COMPLETE;
#ifdef ENABLE_FEAT_F4HWN_SCREENSHOT
getScreenShot();
#endif
#ifdef ENABLE_FEAT_F4HWN_SCREENSHOT
getScreenShot();
#endif
//NVIC_SystemReset();
}
@@ -94,8 +91,7 @@ bool AIRCOPY_SendMessage(void)
return 0;
}
void AIRCOPY_StorePacket(void)
{
void AIRCOPY_StorePacket(void) {
if (gFSKWriteIndex < 36) {
return;
}
@@ -138,16 +134,15 @@ void AIRCOPY_StorePacket(void)
if (Offset == 0x1E00) {
gAircopyState = AIRCOPY_COMPLETE;
#ifdef ENABLE_FEAT_F4HWN_SCREENSHOT
getScreenShot();
#endif
#ifdef ENABLE_FEAT_F4HWN_SCREENSHOT
getScreenShot();
#endif
}
gAirCopyBlockNumber++;
}
static void AIRCOPY_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{
static void AIRCOPY_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
if (bKeyHeld || !bKeyPressed) {
return;
}
@@ -194,8 +189,7 @@ static void AIRCOPY_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
gRequestDisplayScreen = DISPLAY_AIRCOPY;
}
static void AIRCOPY_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
{
static void AIRCOPY_Key_EXIT(bool bKeyPressed, bool bKeyHeld) {
if (bKeyHeld || !bKeyPressed) {
return;
}
@@ -220,8 +214,7 @@ static void AIRCOPY_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
gRequestDisplayScreen = DISPLAY_AIRCOPY;
}
static void AIRCOPY_Key_MENU(bool bKeyPressed, bool bKeyHeld)
{
static void AIRCOPY_Key_MENU(bool bKeyPressed, bool bKeyHeld) {
if (bKeyHeld || !bKeyPressed) {
return;
}
@@ -242,29 +235,28 @@ static void AIRCOPY_Key_MENU(bool bKeyPressed, bool bKeyHeld)
gAircopyState = AIRCOPY_TRANSFER;
}
void AIRCOPY_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{
void AIRCOPY_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
switch (Key) {
case KEY_0:
case KEY_1:
case KEY_2:
case KEY_3:
case KEY_4:
case KEY_5:
case KEY_6:
case KEY_7:
case KEY_8:
case KEY_9:
AIRCOPY_Key_DIGITS(Key, bKeyPressed, bKeyHeld);
break;
case KEY_MENU:
AIRCOPY_Key_MENU(bKeyPressed, bKeyHeld);
break;
case KEY_EXIT:
AIRCOPY_Key_EXIT(bKeyPressed, bKeyHeld);
break;
default:
break;
case KEY_0:
case KEY_1:
case KEY_2:
case KEY_3:
case KEY_4:
case KEY_5:
case KEY_6:
case KEY_7:
case KEY_8:
case KEY_9:
AIRCOPY_Key_DIGITS(Key, bKeyPressed, bKeyHeld);
break;
case KEY_MENU:
AIRCOPY_Key_MENU(bKeyPressed, bKeyHeld);
break;
case KEY_EXIT:
AIRCOPY_Key_EXIT(bKeyPressed, bKeyHeld);
break;
default:
break;
}
}