Skip to content

Commit

Permalink
Refactor timestamps to use uint32_t
Browse files Browse the repository at this point in the history
  • Loading branch information
TillFleisch committed Feb 3, 2024
1 parent 401f5ec commit 3283e49
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions components/philips_series_2200/button/action_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ namespace esphome
/// @brief true if the component is currently performing a long press
bool is_long_pressing_ = false;
/// @brief time at which the button press was started
long press_start_ = -(LONG_PRESS_DURATION + 1);
uint32_t press_start_ = -(LONG_PRESS_DURATION + 1);
/// @brief time at which the last message was sent
long last_message_sent_ = 0;
uint32_t last_message_sent_ = 0;
};
} // namespace philips_action_button
} // namespace philips_series_2200
Expand Down
2 changes: 1 addition & 1 deletion components/philips_series_2200/number/beverage_setting.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ namespace esphome
int8_t target_amount_ = -1;

/// @brief timestamp of the last transmission
long last_transmission_ = 0;
uint32_t last_transmission_ = 0;

/// @brief reference to a status sensor
philips_status_sensor::StatusSensor *status_sensor_;
Expand Down
4 changes: 2 additions & 2 deletions components/philips_series_2200/philips_series_2200.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ namespace esphome
#endif

private:
long last_message_from_mainboard_time_ = 0;
long last_message_from_display_time_ = 0;
uint32_t last_message_from_mainboard_time_ = 0;
uint32_t last_message_from_display_time_ = 0;

/// @brief reference to uart connected to the display unit
uart::UARTDevice display_uart_;
Expand Down
2 changes: 1 addition & 1 deletion components/philips_series_2200/switch/power.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ namespace esphome
/// @brief Determines wether a power trip should be performed
bool should_power_trip_ = false;
/// @brief Time of last power trip
long last_power_trip_ = 0;
uint32_t last_power_trip_ = 0;
/// @brief nr of power performed power trips
int power_trip_count_ = 0;
/// @brief initial power state reference
Expand Down
2 changes: 1 addition & 1 deletion components/philips_series_2200/text_sensor/status_sensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace esphome
bool use_cappuccino_ = false;

/// @brief time of play/pause change
long play_pause_last_change_ = 0;
uint32_t play_pause_last_change_ = 0;
};
} // namespace philips_status_sensor
} // namespace philips_series_2200
Expand Down

0 comments on commit 3283e49

Please sign in to comment.