Skip to content

Commit 322e04f

Browse files
committed
minor: Add some comments
1 parent 4736276 commit 322e04f

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/devices/acurite.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2028,7 +2028,7 @@ r_device const acurite_590tx = {
20282028
.short_width = 500, // short gap is 500 us
20292029
.long_width = 1500, // long gap is 1500 us
20302030
.gap_limit = 2000, // (preceeding) sync gap is 3000 us
2031-
.reset_limit = 3500, // no packet gap, sync gap is 500 us
2031+
.reset_limit = 3500, // no packet gap, gap before sync is 500 us
20322032
.decode_fn = &acurite_590tx_decode,
20332033
.fields = acurite_590_output_fields,
20342034
};

src/devices/oregon_scientific.c

+10
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,16 @@ static int oregon_scientific_v2_1_decode(r_device *decoder, bitbuffer_t *bitbuff
498498
else if (sensor_id == ID_BTHGN129) {
499499
if (validate_os_v2_message(decoder, msg, 92, msg_bits, 19) != 0)
500500
return 0;
501+
// int comfort = msg[7] >> 4;
502+
// char *comfort_str = "Normal";
503+
// if (comfort == 0x4) comfort_str = "Comfortable";
504+
// else if (comfort == 0x8) comfort_str = "Dry";
505+
// else if (comfort == 0xc) comfort_str = "Humid";
506+
// int forecast = msg[9] >> 4;
507+
// char *forecast_str = "Cloudy";
508+
// if (forecast == 0x3) forecast_str = "Rainy";
509+
// else if (forecast == 0x6) forecast_str = "Partly Cloudy";
510+
// else if (forecast == 0xc) forecast_str = "Sunny";
501511
float temp_c = get_os_temperature(msg);
502512
// Pressure is given in hPa. You may need to adjust the offset
503513
// according to your altitude level (600 is a good starting point)

src/http_server.c

+3
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,9 @@ static void handle_json_stream(struct mg_connection *nc, struct http_message *hm
951951
// curl -D - -d "cmd=report_meta&arg=level" -X POST 'http://127.0.0.1:8433/cmd'
952952
// http :8433/cmd cmd==center_frequency val==868000000'
953953
// http --form POST :8433/cmd cmd=report_meta arg=level val=1
954+
// xh :8433/cmd cmd==center_frequency val==433920123
955+
// xh :8433/cmd cmd==sample_rate val==250000
956+
// xh :8433/cmd cmd==gain arg==10
954957
static void handle_cmd_rpc(struct mg_connection *nc, struct http_message *hm)
955958
{
956959
struct http_server_context *ctx = nc->user_data;

0 commit comments

Comments
 (0)