Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
620a4d77
Commit
620a4d77
authored
May 09, 2021
by
Eric Duminil
Browse files
cfg -> config
parent
d1e0bc75
Changes
2
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/save_config.h
View file @
620a4d77
...
...
@@ -35,8 +35,8 @@ static constexpr char CFG_KEY_WIFI_PASSWORD[] PROGMEM = "wifi_password";
static
constexpr
char
CFG_KEY_WIFI_TIMEOUT
[]
PROGMEM
=
"wifi_timeout"
;
static
constexpr
char
CFG_KEY_AUTO_CALIBRATE_SENSOR
[]
PROGMEM
=
"auto_calibrate_sensor"
;
static
constexpr
ConfigShapeEntry
configShape
[]
PROGMEM
=
{
{
Config_Type_String
,
sizeof
(
c
f
g
::
wifi_ssid
)
-
1
,
CFG_KEY_WIFI_SSID
,
c
f
g
::
wifi_ssid
},
{
Config_Type_Password
,
sizeof
(
c
f
g
::
wifi_password
)
-
1
,
CFG_KEY_WIFI_PASSWORD
,
c
f
g
::
wifi_password
},
{
Config_Type_UInt
,
0
,
CFG_KEY_WIFI_TIMEOUT
,
&
c
f
g
::
wifi_timeout
},
{
Config_Type_Bool
,
0
,
CFG_KEY_AUTO_CALIBRATE_SENSOR
,
&
c
f
g
::
auto_calibrate_sensor
},
{
Config_Type_String
,
sizeof
(
c
onfi
g
::
wifi_ssid
)
-
1
,
CFG_KEY_WIFI_SSID
,
c
onfi
g
::
wifi_ssid
},
{
Config_Type_Password
,
sizeof
(
c
onfi
g
::
wifi_password
)
-
1
,
CFG_KEY_WIFI_PASSWORD
,
c
onfi
g
::
wifi_password
},
{
Config_Type_UInt
,
0
,
CFG_KEY_WIFI_TIMEOUT
,
&
c
onfi
g
::
wifi_timeout
},
{
Config_Type_Bool
,
0
,
CFG_KEY_AUTO_CALIBRATE_SENSOR
,
&
c
onfi
g
::
auto_calibrate_sensor
},
};
generate_ampel_config_h.py
View file @
620a4d77
...
...
@@ -52,8 +52,8 @@ enum ConfigShapeId {""", file=h)
for
cfgtype
,
cfgkey
in
entries
:
print
(
" { Config_Type_"
,
cfgtype
,
", sizeof(c
f
g::"
+
cfgkey
+
")-1"
if
cfgtype
in
(
'String'
,
'Password'
)
else
", 0"
,
", sizeof(c
onfi
g::"
+
cfgkey
+
")-1"
if
cfgtype
in
(
'String'
,
'Password'
)
else
", 0"
,
", CFG_KEY_"
,
cfgkey
.
upper
(),
", "
,
""
if
cfgtype
in
(
'String'
,
'Password'
)
else
"&"
,
"c
f
g::"
,
cfgkey
,
" },"
,
sep
=
''
,
file
=
h
)
"c
onfi
g::"
,
cfgkey
,
" },"
,
sep
=
''
,
file
=
h
)
print
(
"};"
,
file
=
h
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment