Skip to content

Commit 8f45322

Browse files
CheeseECheeseE
CheeseE
authored and
CheeseE
committed
disable board selection.
1 parent 6e095c1 commit 8f45322

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

interface/src/project/SettingsApplication.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,18 @@ const SettingsApplication: FC = () => {
124124
name="board_profile"
125125
label={LL.BOARD_PROFILE()}
126126
value={data.board_profile}
127-
disabled={processingBoard}
127+
disabled={processingBoard || data.board_profile === 'C3MINI'}
128128
variant="outlined"
129129
onChange={changeBoardProfile}
130130
margin="normal"
131131
select
132132
>
133133
{boardProfileSelectItems()}
134+
{data.board_profile === 'C3MINI' && (
135+
<MenuItem key={'C3MINI'} value={'C3MINI'}>
136+
C3 Mini
137+
</MenuItem>
138+
)}
134139
<Divider />
135140
<MenuItem key={'CUSTOM'} value={'CUSTOM'}>
136141
Custom&hellip;

interface/src/project/types.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ export const BOARD_PROFILES: BoardProfiles = {
238238
'MH-ET': 'MH-ET Live D1 Mini',
239239
LOLIN: 'Lolin D32',
240240
OLIMEX: 'Olimex ESP32-EVB',
241-
OLIMEXPOE: 'Olimex ESP32-POE',
242-
C3MINI: 'Lolin C3 mini'
241+
OLIMEXPOE: 'Olimex ESP32-POE'
243242
};
244243

245244
export interface BoardProfileName {

src/web/WebSettingsService.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ void WebSettings::read(WebSettings & settings, JsonObject & root) {
8181
StateUpdateResult WebSettings::update(JsonObject & root, WebSettings & settings) {
8282
// load default GPIO configuration based on board profile
8383
std::vector<int8_t> data; // // led, dallas, rx, tx, button, phy_type, eth_power, eth_phy_addr, eth_clock_mode
84-
settings.board_profile = root["board_profile"] | EMSESP_DEFAULT_BOARD_PROFILE;
84+
#ifdef ARDUINO_LOLIN_C3_MINI
85+
settings.board_profile = "C3MINI";
86+
#else
87+
settings.board_profile = root["board_profile"] | EMSESP_DEFAULT_BOARD_PROFILE;
88+
#endif
8589
if (!System::load_board_profile(data, settings.board_profile.c_str())) {
8690
settings.board_profile = "CUSTOM";
8791
EMSESP::logger().info("No board profile found. Re-setting to %s", settings.board_profile.c_str());

0 commit comments

Comments
 (0)