Skip to content

Commit cb6406f

Browse files
authored
Merge branch 'devel' into ack-mgmt
2 parents 6caee2d + 9793eee commit cb6406f

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

src/Arduino_Alvik.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ int Arduino_Alvik::begin(const bool verbose, const uint8_t core){
132132

133133

134134
uart->begin(UART_BAUD_RATE);
135-
uart->flush();
136135

137-
136+
138137
pinMode(CHECK_STM32, INPUT_PULLDOWN);
139138
pinMode(RESET_STM32, OUTPUT);
140139
pinMode(NANO_CHK, OUTPUT);
@@ -151,6 +150,11 @@ int Arduino_Alvik::begin(const bool verbose, const uint8_t core){
151150
delay(100);
152151
reset_hw();
153152

153+
uart->flush();
154+
while (uart->available()){
155+
uart->read();
156+
}
157+
154158
wait_for_ack();
155159

156160
set_illuminator(true);

src/default_colors.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@
1515

1616
#include "Arduino.h"
1717

18-
#define WHITE_DEFAULT_RED 444
19-
#define WHITE_DEFAULT_GREEN 342
20-
#define WHITE_DEFAULT_BLUE 345
21-
#define BLACK_DEFAULT_RED 153
22-
#define BLACK_DEFAULT_GREEN 135
23-
#define BLACK_DEFAULT_BLUE 123
18+
#define WHITE_DEFAULT_RED 450
19+
#define WHITE_DEFAULT_GREEN 500
20+
#define WHITE_DEFAULT_BLUE 510
21+
#define BLACK_DEFAULT_RED 160
22+
#define BLACK_DEFAULT_GREEN 200
23+
#define BLACK_DEFAULT_BLUE 190
2424
//int16_t WHITE_CAL[3] = {444, 342, 345};
2525
//int16_t BLACK_CAL[3] = {153, 135, 123};
2626

27+
2728
#define WHITE_OFFSET 0
2829
#define BLACK_OFFSET 6
2930
#define COLOR_SIZE 20
@@ -41,7 +42,7 @@
4142
#define LIGHT_GREEN_MAX 140
4243
#define GREEN_MAX 170
4344
#define LIGHT_BLUE_MAX 210
44-
#define BLUE_MAX 260
45+
#define BLUE_MAX 250
4546
#define VIOLET_MAX 280
4647
#define BROWN_MAX_VALUE 0.5
4748
#define BROWN_MAX_SATURATION 0.45

src/definitions.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
#define UART 0
2828
#define UART_BAUD_RATE 460800
2929

30+
#define DL1 left_led
31+
#define DL2 right_led
32+
3033
#define CHARGE_THRESHOLD 97
3134

3235
#define NO_ACK 0xFF

0 commit comments

Comments
 (0)