Skip to content

Commit

Permalink
WS: Update API (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skorpionm authored Mar 5, 2024
1 parent ad36dbd commit cd9c4e5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
2 changes: 2 additions & 0 deletions weather_station/.catalog/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 1.5
- Update API
## 1.4
- Add protocol EMOS E601x
## 1.3
Expand Down
2 changes: 1 addition & 1 deletion weather_station/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ App(
requires=["gui"],
stack_size=4 * 1024,
fap_description="Receive weather data from a wide range of supported Sub-1GHz remote sensor",
fap_version="1.4",
fap_version="1.5",
fap_icon="weather_station_10px.png",
fap_category="Sub-GHz",
fap_icon_assets="images",
Expand Down
4 changes: 1 addition & 3 deletions weather_station/protocols/ws_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ SubGhzProtocolStatus ws_block_generic_serialize(
}

//DATE AGE set
FuriHalRtcDateTime curr_dt;
furi_hal_rtc_get_datetime(&curr_dt);
uint32_t curr_ts = furi_hal_rtc_datetime_to_timestamp(&curr_dt);
uint32_t curr_ts = furi_hal_rtc_get_timestamp();

temp_data = curr_ts;
if(!flipper_format_write_uint32(flipper_format, "Ts", &temp_data, 1)) {
Expand Down
10 changes: 2 additions & 8 deletions weather_station/views/weather_station_receiver_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ void ws_view_receiver_info_update(WSReceiverInfo* ws_receiver_info, FlipperForma

ws_block_generic_deserialize(model->generic, fff);

FuriHalRtcDateTime curr_dt;
furi_hal_rtc_get_datetime(&curr_dt);
model->curr_ts = furi_hal_rtc_datetime_to_timestamp(&curr_dt);
model->curr_ts = furi_hal_rtc_get_timestamp();
},
true);
}
Expand Down Expand Up @@ -185,11 +183,7 @@ static void ws_view_receiver_info_timer(void* context) {
with_view_model(
ws_receiver_info->view,
WSReceiverInfoModel * model,
{
FuriHalRtcDateTime curr_dt;
furi_hal_rtc_get_datetime(&curr_dt);
model->curr_ts = furi_hal_rtc_datetime_to_timestamp(&curr_dt);
},
{ model->curr_ts = furi_hal_rtc_get_timestamp(); },
true);
}

Expand Down

0 comments on commit cd9c4e5

Please sign in to comment.