uint8_t text[64];
snprintf(text, sizeof(text) - 1, "%ld", el->id);
+
cairo_move_to (cr, l->x0 - 20, l->y0 + 5);
cairo_show_text(cr, text);
+ cairo_stroke(cr);
if (el->v < SCF_EDA_V_MIN)
snprintf(text, sizeof(text) - 1, "%lg", B->pins[SCF_EDA_Battery_NEG]->v);
else if (el->v > SCF_EDA_V_MAX)
snprintf(text, sizeof(text) - 1, "%lg", B->pins[SCF_EDA_Battery_POS]->v);
+
+ else if (el->v > 1e-3 || el->v < -1e-3)
+ snprintf(text, sizeof(text) - 1, "%lgv", (int)(el->v * 1000) / 1000.0);
+
+ else if (el->v > 1e-6 || el->v < -1e-6)
+ snprintf(text, sizeof(text) - 1, "%lgmV", (int)(el->v * 1000000) / 1000.0);
else
- snprintf(text, sizeof(text) - 1, "%lg", el->v);
+ snprintf(text, sizeof(text) - 1, "%lguV", (int)(el->v * 1000000) / 1000000.0);
+
+ cairo_set_font_size(cr, 20);
cairo_move_to (cr, l->x0 - 24, l->y0 + 24);
cairo_show_text(cr, text);