Skip to content

Commit 9a0572f

Browse files
sunpicursoragent
andcommitted
Write Influx bool signals as 0.0/1.0 to fix schema conflicts.
InfluxDB rejects mixed boolean and float values in the same measurement batch; numeric encoding matches the mobile app telemetry contract. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 71eb4c8 commit 9a0572f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/influx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ static void influx_flush(influx_ctx_t *ctx) {
165165
if (!ctx->slots[i].bool_seen) continue;
166166
bool v = ctx->slots[i].bool_any;
167167
n = snprintf(line, sizeof line,
168-
"%s,signal=%s value=%s %" PRId64 "\n",
169-
ctx->measurement, esc_name, v ? "true" : "false", ts_ns);
168+
"%s,signal=%s value=%.1f %" PRId64 "\n",
169+
ctx->measurement, esc_name, v ? 1.0 : 0.0, ts_ns);
170170
} else {
171171
if (ctx->slots[i].count == 0) continue;
172172
double mean = ctx->slots[i].sum / (double)ctx->slots[i].count;

0 commit comments

Comments
 (0)