Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset config via define RESET_CONFIG #196

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
// #define REV_UART
// #define VIDEO_PAT
// #define FIX_EEP
// #define RESET_CONFIG

#ifndef _RF_CALIB
// #define _DEBUG_MODE
Expand Down
12 changes: 8 additions & 4 deletions src/hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ uint8_t timer_cnt = 0;
uint8_t led_timer_cnt = 0;

void LED_Init();
#if (0)
uint8_t check_uart_loopback();
#endif
void reset_config();

void Set_720P50(uint8_t page) {
Expand Down Expand Up @@ -535,8 +537,9 @@ void Init_HW() {
LED_TC3587_Init();
#endif

if (check_uart_loopback())
reset_config();
#ifdef RESET_CONFIG
reset_config();
#endif

GetVtxParameter();
Get_EEP_LifeTime();
Expand Down Expand Up @@ -1704,7 +1707,7 @@ void reset_config() {

I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_CAM_TYPE, 0);
}

#if (0)
uint8_t check_uart_loopback() {
uint8_t rdat[4];
uint8_t i = 0;
Expand All @@ -1728,4 +1731,5 @@ uint8_t check_uart_loopback() {
} else {
return 0;
}
}
}
#endif