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
Werner Sembach
Ainigma
Commits
ba245166
Commit
ba245166
authored
Sep 08, 2017
by
Margit Haspel
Browse files
quick doku fix
parent
1dc412a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
inc/Util.h
View file @
ba245166
...
...
@@ -11,6 +11,14 @@
#define SPRING_RIGHT 1
#define SPRING_NOTHING 2
/* About the spring struct:
* unsigned int threshold: remember the potty protection zones
* uint8_t direction: SPRING_LEFT, SPRING_LEFT direction the spring is turning in this interval
* double power: between 0 and 1.0; power < 0 makes it linear to the adc value
* bool solved: the bool that is returned if the adc value is below the threshold (set it to true in the range the riddle should be solved)
* the structs have have to be sorted ascending by threshold
*/
typedef
struct
Spring
{
unsigned
int
threshold
;
uint8_t
direction
;
...
...
main.c
View file @
ba245166
...
...
@@ -3,10 +3,10 @@
#include "Util.h"
#include "easy_riddle.h"
//
#include "easy_riddle.h"
//#include "hill_riddle.h"
//#include "lever_riddle.h"
//
#include "nine_riddle.h"
#include "nine_riddle.h"
//#include "spring_riddle.h"
#define STACKSIZE (CYGNUM_HAL_STACK_SIZE_MINIMUM+1024)
...
...
riddles/hill_riddle.h
View file @
ba245166
...
...
@@ -14,14 +14,6 @@ void riddle(void) {
servo_set_percent
(
SERVO_0
,
0
.
5
);
dc_set_percent
(
0
,
0
.
0
);
/*About the spring struct:
unsigned int threshold: remember the potty protection zones
uint8_t direction: SPRING_LEFT, SPRING_LEFT direction the spring is turning in this interval
double power: between 0 and 1.0; power < 0 makes it linear to the adc value
bool solved: the bool that is returned if the adc value is below the threshold (set it to true in the range the riddle should be solved)
-> the structs have have to be sorted ascending by threshold*/
bool
springa_broken
=
false
;
bool
springb_broken
=
false
;
bool
unlocked_b
=
false
;
...
...
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