From 3edecb36fb62c3bf3b58215a87ccea14ec14e1b0 Mon Sep 17 00:00:00 2001 From: Gillian Minnehan <41022382+gminn@users.noreply.github.com> Date: Wed, 8 Nov 2023 19:45:31 -0500 Subject: [PATCH] Fix code formatting (#397) --- _posts/2023-11-08-device-reliability-metrics.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/_posts/2023-11-08-device-reliability-metrics.md b/_posts/2023-11-08-device-reliability-metrics.md index b29df4acd..49f1ff914 100644 --- a/_posts/2023-11-08-device-reliability-metrics.md +++ b/_posts/2023-11-08-device-reliability-metrics.md @@ -235,28 +235,28 @@ static uint32_t crash_free_hours = 0 static uint32_t operational_seconds = 0 void metrics_on_second__callback(void) { - time_without_crash++; + time_without_crash++; if (time_without_crash >= 3600) { - crashfree_hours++ - time_without_crash = 0 + crashfree_hours++ + time_without_crash = 0 } } void metrics_on_crash__callback(void) { - time_without_crash = 0; + time_without_crash = 0; } void metrics_on_shutdown__callback(void) { // Since it's not a crash, we'll save // the value for the next boot - persisted_time_without_crash = time_without_crash; + persisted_time_without_crash = time_without_crash; } void metrics_on_heartbeat__callback(void) { - heartbeat.operational_hours = floor(operational_seconds / 3600); - operational_seconds = operational_seconds % 3600; + heartbeat.operational_hours = floor(operational_seconds / 3600); + operational_seconds = operational_seconds % 3600; heartbeat.crash_free_hours = crash_free_hours; - crash_free_hours = 0; + crash_free_hours = 0; // serialize and send metrics })