Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sven Greiner
rampinglight
Commits
f1de06b7
Commit
f1de06b7
authored
Dec 27, 2018
by
Sven Greiner
Browse files
Add defines for number of presses
parent
8a402eff
Changes
1
Hide whitespace changes
Inline
Side-by-side
rampinglight.c
View file @
f1de06b7
...
...
@@ -52,6 +52,10 @@
#define EEPROM_OPTIONS (EEPROM_SIZE-1)
#define EEPROM_OUTPUT_WL_BYTES 16
#define TURBO_PRESSES 2
#define BATTCHECK_PRESSES FIXED_SIZE+1
#define CONFIG_PRESSES 10
/**
* States of the state machine.
*/
...
...
@@ -370,12 +374,12 @@ int main(void) {
if
(
options
.
fixed_mode
)
{
switch
(
fast_presses
)
{
#ifdef BATTCHECK
case
FIXED_SIZE
+
1
:
case
BATTCHECK_PRESSES
:
state
=
kBattcheck
;
break
;
#endif // ifdef BATTCHECK
case
10
:
case
CONFIG_PRESSES
:
state
=
kConfig
;
break
;
...
...
@@ -387,17 +391,17 @@ int main(void) {
}
}
else
{
switch
(
fast_presses
)
{
case
2
:
case
TURBO_PRESSES
:
state
=
kTurbo
;
break
;
#ifdef BATTCHECK
case
FIXED_SIZE
+
1
:
case
BATTCHECK_PRESSES
:
state
=
kBattcheck
;
break
;
#endif // ifdef BATTCHECK
case
10
:
case
CONFIG_PRESSES
:
state
=
kConfig
;
break
;
...
...
Write
Preview
Supports
Markdown
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