Skip to content

Commit

Permalink
Update neptune_r900.c
Browse files Browse the repository at this point in the history
updated param name to "version" to deconflict.
  • Loading branch information
dockSquadron authored Apr 3, 2024
1 parent b2e66e2 commit 77ec6bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/devices/neptune_r900.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ static int neptune_r900_decode(r_device *decoder, bitbuffer_t *bitbuffer)

//meter_id 32 bits
uint32_t meter_id = ((uint32_t)b[0] << 24) | (b[1] << 16) | (b[2] << 8) | (b[3]);
//protocol 8 bits
int protocol = b[4];
//version 8 bits
int version = b[4];
//Unkn2 3 bits
int unkn2 = b[5] >> 5;
//NoUse 3 bits
Expand All @@ -170,7 +170,7 @@ static int neptune_r900_decode(r_device *decoder, bitbuffer_t *bitbuffer)
int consumption;
int unkn3;

Check failure on line 172 in src/devices/neptune_r900.c

View workflow job for this annotation

GitHub Actions / Check code style

TRAILING whitespace error
if (protocol == 163){
if (version == 163){

Check failure on line 173 in src/devices/neptune_r900.c

View workflow job for this annotation

GitHub Actions / Check code style

STICKY-BRACE error
//Consumption 3 bits Unkn3 + 24 bits
consumption = ((b[9] >> 5) << 24 | b[6] << 16) | (b[7] << 8) | (b[8]);
}else{
Expand Down Expand Up @@ -202,7 +202,7 @@ static int neptune_r900_decode(r_device *decoder, bitbuffer_t *bitbuffer)
data_t *data = data_make(
"model", "", DATA_STRING, "Neptune-R900",
"id", "", DATA_INT, meter_id,
"protocol", "", DATA_INT, protocol,
"version", "", DATA_INT, version,
"unkn2", "", DATA_INT, unkn2,
"nouse", "", DATA_INT, nouse,
"backflow", "", DATA_INT, backflow,
Expand Down Expand Up @@ -230,7 +230,7 @@ static int neptune_r900_decode(r_device *decoder, bitbuffer_t *bitbuffer)
static char const *const output_fields[] = {
"model",
"id",
"protocol",
"version",
"unkn2",
"nouse",
"backflow",
Expand Down

0 comments on commit 77ec6bd

Please sign in to comment.