![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Callum and Adel's changes on 12/02/19
Dependencies: Crypto
Diff: main.cpp
- Revision:
- 17:5a443275680a
- Parent:
- 16:db7ef0a4aa23
diff -r db7ef0a4aa23 -r 5a443275680a main.cpp --- a/main.cpp Wed Mar 06 10:43:22 2019 +0000 +++ b/main.cpp Wed Mar 06 11:27:53 2019 +0000 @@ -104,9 +104,10 @@ void stateUpdate(int8_t *params[]) { // () { // **params + *params[0] = readRotorState(); int8_t currentState = *params[0]; int8_t offset = *params[1]; - currentState = readRotorState(); + motorOut((currentState - offset + lead + 6) % 6); }