File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ let serialCache = {
5454}
5555function cacheSerial ( message ) { //Build up a bit of a cache of serial messages because they seem to come in chunks
5656 if ( serialCache [ "updated" ] < ( Date . now ( ) - 65000 ) ) { //If the cache is older than 65 seconds
57+ logger . log ( "warn" , "Resetting cache (out of date)" , serialCache )
5758 serialCache [ "cache" ] = Buffer . from ( [ ] ) //Reset the cache
5859 }
5960 serialCache [ "updated" ] = Date . now ( )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const parser = (inputBuffer, offset) => {
1818 data . temperatureF = ( data . temperatureRaw / 10 ) . toFixed ( 1 ) // Temperature in degrees F
1919 data . temperatureC = ( ( ( data . temperatureRaw / 10 ) - 32 ) * ( 5 / 9 ) ) . toFixed ( 1 ) // Temperature in degrees C
2020 if ( data . windDirection < 1 || data . windDirection > 360 ) {
21- logger . log ( "warn" , "Wind direction out of range" )
21+ logger . log ( "warn" , "Wind direction out of range" , data )
2222 return false
2323 } else if ( data . windSpeed == 255 && data . humidity == 255 ) {
2424 logger . log ( "warn" , "Wind speed and humidity are 255 - console is in setup mode" )
You can’t perform that action at this time.
0 commit comments