From 8679d6ac16316cab1d3efe80198940053c0b145b Mon Sep 17 00:00:00 2001 From: Synergeia <35604547+Synergeia@users.noreply.github.com> Date: Thu, 21 Nov 2019 14:53:07 +0600 Subject: [PATCH] Wrong formats According to Vantage Pro2 Serial Communication Reference Manual, BarTrend are signed byte. Also TempOut is signed int too because when outside temp are lower than 0 F we get 6000+ F. Sorry for bad english. --- pyvantagepro/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyvantagepro/parser.py b/pyvantagepro/parser.py index 5bbfb5a..1dc36c4 100644 --- a/pyvantagepro/parser.py +++ b/pyvantagepro/parser.py @@ -129,9 +129,9 @@ class LoopDataParserRevB(DataParser): real-time data that can be read from the Davis VantagePro2.''' # Loop data format (RevB) LOOP_FORMAT = ( - ('LOO', '3s'), ('BarTrend', 'B'), ('PacketType', 'B'), + ('LOO', '3s'), ('BarTrend', 'b'), ('PacketType', 'B'), ('NextRec', 'H'), ('Barometer', 'H'), ('TempIn', 'H'), - ('HumIn', 'B'), ('TempOut', 'H'), ('WindSpeed', 'B'), + ('HumIn', 'B'), ('TempOut', 'h'), ('WindSpeed', 'B'), ('WindSpeed10Min', 'B'), ('WindDir', 'H'), ('ExtraTemps', '7s'), ('SoilTemps', '4s'), ('LeafTemps', '4s'), ('HumOut', 'B'), ('HumExtra', '7s'), ('RainRate', 'H'), ('UV', 'B'),