mirror of
https://github.com/agdsn/ancient-weatherstation.git
synced 2026-06-19 23:07:59 +00:00
negative-temp bug fixed
git-svn-id: file:///home/jan/tmp/wetterstation/trunk@190 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
@@ -288,7 +288,7 @@ static pyano_data process_pyano(time_t timestamp, u_char address, u_char *buffer
|
|||||||
static int convert_signed_int(u_char hi_byte, u_char lo_byte){
|
static int convert_signed_int(u_char hi_byte, u_char lo_byte){
|
||||||
int val;
|
int val;
|
||||||
val = convert_unsigned_int(hi_byte,lo_byte);
|
val = convert_unsigned_int(hi_byte,lo_byte);
|
||||||
if (get_bit(val,14)){
|
if (get_bit(val,13)){
|
||||||
val |= ~(0x3FFF);
|
val |= ~(0x3FFF);
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
|
|||||||
Reference in New Issue
Block a user