Skip to content

Commit

Permalink
minor: Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckschwerdt committed Oct 16, 2024
1 parent 4736276 commit 322e04f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/devices/acurite.c
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,7 @@ r_device const acurite_590tx = {
.short_width = 500, // short gap is 500 us
.long_width = 1500, // long gap is 1500 us
.gap_limit = 2000, // (preceeding) sync gap is 3000 us
.reset_limit = 3500, // no packet gap, sync gap is 500 us
.reset_limit = 3500, // no packet gap, gap before sync is 500 us
.decode_fn = &acurite_590tx_decode,
.fields = acurite_590_output_fields,
};
10 changes: 10 additions & 0 deletions src/devices/oregon_scientific.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,16 @@ static int oregon_scientific_v2_1_decode(r_device *decoder, bitbuffer_t *bitbuff
else if (sensor_id == ID_BTHGN129) {
if (validate_os_v2_message(decoder, msg, 92, msg_bits, 19) != 0)
return 0;
// int comfort = msg[7] >> 4;
// char *comfort_str = "Normal";
// if (comfort == 0x4) comfort_str = "Comfortable";
// else if (comfort == 0x8) comfort_str = "Dry";
// else if (comfort == 0xc) comfort_str = "Humid";
// int forecast = msg[9] >> 4;
// char *forecast_str = "Cloudy";
// if (forecast == 0x3) forecast_str = "Rainy";
// else if (forecast == 0x6) forecast_str = "Partly Cloudy";
// else if (forecast == 0xc) forecast_str = "Sunny";
float temp_c = get_os_temperature(msg);
// Pressure is given in hPa. You may need to adjust the offset
// according to your altitude level (600 is a good starting point)
Expand Down
3 changes: 3 additions & 0 deletions src/http_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,9 @@ static void handle_json_stream(struct mg_connection *nc, struct http_message *hm
// curl -D - -d "cmd=report_meta&arg=level" -X POST 'http://127.0.0.1:8433/cmd'
// http :8433/cmd cmd==center_frequency val==868000000'
// http --form POST :8433/cmd cmd=report_meta arg=level val=1
// xh :8433/cmd cmd==center_frequency val==433920123
// xh :8433/cmd cmd==sample_rate val==250000
// xh :8433/cmd cmd==gain arg==10
static void handle_cmd_rpc(struct mg_connection *nc, struct http_message *hm)
{
struct http_server_context *ctx = nc->user_data;
Expand Down

0 comments on commit 322e04f

Please sign in to comment.