File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ const static uint16_t _windvane_table[16][2] = {
60
60
{2475 , 599 },
61
61
{2250 , 630 },
62
62
{3375 , 703 },
63
- {0 , 786 },
63
+ {0 , 730 },
64
64
{2925 , 828 },
65
65
{3150 , 887 },
66
66
{2700 , 945 }
@@ -174,6 +174,8 @@ float WeatherMeters<N>::adcToDir(uint16_t value) {
174
174
if (_serial) {
175
175
_serial->print (F (" [WEATHER] Wind vane ADC:" ));
176
176
_serial->print (value);
177
+ _serial->print (F (" , raw dir: " ));
178
+ _serial->print (dir);
177
179
_serial->print (F (" , " ));
178
180
}
179
181
@@ -182,6 +184,8 @@ float WeatherMeters<N>::adcToDir(uint16_t value) {
182
184
183
185
filtered_dir = round (filtered_dir / 22.5 ) * 22.5 ; // get 22.5° resolution
184
186
187
+ if (filtered_dir >= 360.0 ) filtered_dir = 0 ;
188
+
185
189
if (_serial) {
186
190
_serial->print (F (" filtered dir: " ));
187
191
}
Original file line number Diff line number Diff line change 16
16
"dependencies" :
17
17
{
18
18
"name" : " MovingAverageAngle" ,
19
- "version" : " ^1.0.2 "
19
+ "version" : " ^1.0.3 "
20
20
},
21
21
"version" : " 2.0.0" ,
22
22
"frameworks" : " arduino" ,
You can’t perform that action at this time.
0 commit comments