Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge/template v2.5.0 #16

Merged
merged 11 commits into from
Dec 18, 2024
Prev Previous commit
Next Next commit
battery_monitor: fix formatting inconsistencies
Fixes formatting to adhere to .clang-format.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
hasheddan committed Sep 16, 2024
commit 200fc8a2fb1fe5c96d9be80fb375205bb0f2f89b
12 changes: 3 additions & 9 deletions src/battery_monitor/battery.c
Original file line number Diff line number Diff line change
@@ -311,8 +311,7 @@ void log_battery_data(void)
}

static void async_error_handler(struct golioth_client *client,
const struct golioth_response *response,
const char *path,
const struct golioth_response *response, const char *path,
void *arg)
{
if (response->status != GOLIOTH_OK) {
@@ -333,13 +332,8 @@ int stream_battery_data(struct golioth_client *client, struct battery_data *batt
batt_data->battery_level_pptt % 100);
LOG_DBG("%s", json_buf);

err = golioth_stream_set_async(client,
stream_endpoint,
GOLIOTH_CONTENT_TYPE_JSON,
json_buf,
strlen(json_buf),
async_error_handler,
NULL);
err = golioth_stream_set_async(client, stream_endpoint, GOLIOTH_CONTENT_TYPE_JSON, json_buf,
strlen(json_buf), async_error_handler, NULL);
if (err) {
LOG_ERR("Failed to send battery data to Golioth: %d", err);
}