Skip to content

Commit 79d1abe

Browse files
authored
Merge pull request #9803 from iNavFlight/dzikuvx-remove-upderclock
Remove unused USE_UNDERCLOCK define and related code
2 parents d38573e + 17f4b25 commit 79d1abe

File tree

11 files changed

+0
-59
lines changed

11 files changed

+0
-59
lines changed

docs/Settings.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -572,16 +572,6 @@ Control rate profile to switch to when the battery profile is selected, 0 to dis
572572

573573
---
574574

575-
### cpu_underclock
576-
577-
This option is only available on certain architectures (F3 CPUs at the moment). It makes CPU clock lower to reduce interference to long-range RC systems working at 433MHz
578-
579-
| Default | Min | Max |
580-
| --- | --- | --- |
581-
| OFF | OFF | ON |
582-
583-
---
584-
585575
### cruise_power
586576

587577
Power draw at cruise throttle used for remaining flight time/distance estimation in 0.01W unit

src/main/drivers/system.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include <stdbool.h>
2222

2323
void systemInit(void);
24-
void systemClockSetup(uint8_t cpuUnderclock);
2524

2625
typedef enum {
2726
FAILURE_DEVELOPER = 0,

src/main/drivers/system_at32f43x.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,6 @@ uint32_t systemBootloaderAddress(void)
114114
//return system_isr_vector_table_base;
115115
}
116116

117-
void systemClockSetup(uint8_t cpuUnderclock)
118-
{
119-
(void)cpuUnderclock;
120-
// This is a stub
121-
}
122-
123117
void systemInit(void)
124118
{
125119
//config system clock to 288mhz usb 48mhz

src/main/drivers/system_stm32f4xx.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,6 @@ uint32_t systemBootloaderAddress(void)
143143
return 0x1FFF0000;
144144
}
145145

146-
void systemClockSetup(uint8_t cpuUnderclock)
147-
{
148-
(void)cpuUnderclock;
149-
// This is a stub
150-
}
151-
152146
void systemInit(void)
153147
{
154148
SetSysClock();

src/main/drivers/system_stm32f7xx.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ uint32_t systemBootloaderAddress(void)
6666
return 0x1FF00000;
6767
}
6868

69-
void systemClockSetup(uint8_t cpuUnderclock)
70-
{
71-
(void)cpuUnderclock;
72-
// This is a stub
73-
}
74-
7569
void systemInit(void)
7670
{
7771
checkForBootLoaderRequest();

src/main/drivers/system_stm32h7xx.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ uint32_t systemBootloaderAddress(void)
6060
#endif
6161
}
6262

63-
void systemClockSetup(uint8_t cpuUnderclock)
64-
{
65-
(void)cpuUnderclock;
66-
// This is a stub
67-
}
68-
6963
void systemInit(void)
7064
{
7165
checkForBootLoaderRequest();

src/main/fc/config.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ PG_RESET_TEMPLATE(systemConfig_t, systemConfig,
115115
#endif
116116
#ifdef USE_I2C
117117
.i2c_speed = SETTING_I2C_SPEED_DEFAULT,
118-
#endif
119-
#ifdef USE_UNDERCLOCK
120-
.cpuUnderclock = SETTING_CPU_UNDERCLOCK_DEFAULT,
121118
#endif
122119
.throttle_tilt_compensation_strength = SETTING_THROTTLE_TILT_COMP_STR_DEFAULT, // 0-100, 0 - disabled
123120
.craftName = SETTING_NAME_DEFAULT,

src/main/fc/config.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ typedef struct systemConfig_s {
7676
#endif
7777
#ifdef USE_I2C
7878
uint8_t i2c_speed;
79-
#endif
80-
#ifdef USE_UNDERCLOCK
81-
uint8_t cpuUnderclock;
8279
#endif
8380
uint8_t throttle_tilt_compensation_strength; // the correction that will be applied at throttle_correction_angle.
8481
char craftName[MAX_NAME_LENGTH + 1];

src/main/fc/fc_init.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,6 @@ void init(void)
229229
readEEPROM();
230230
resumeRxSignal();
231231

232-
#ifdef USE_UNDERCLOCK
233-
// Re-initialize system clock to their final values (if necessary)
234-
systemClockSetup(systemConfig()->cpuUnderclock);
235-
#else
236-
systemClockSetup(false);
237-
#endif
238-
239232
#ifdef USE_I2C
240233
i2cSetSpeed(systemConfig()->i2c_speed);
241234
#endif

src/main/fc/settings.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3755,12 +3755,6 @@ groups:
37553755
default_value: "400KHZ"
37563756
condition: USE_I2C
37573757
table: i2c_speed
3758-
- name: cpu_underclock
3759-
description: "This option is only available on certain architectures (F3 CPUs at the moment). It makes CPU clock lower to reduce interference to long-range RC systems working at 433MHz"
3760-
default_value: OFF
3761-
field: cpuUnderclock
3762-
condition: USE_UNDERCLOCK
3763-
type: bool
37643758
- name: debug_mode
37653759
description: "Defines debug values exposed in debug variables (developer / debugging setting)"
37663760
default_value: "NONE"

0 commit comments

Comments
 (0)