diff Discovery/Src/tInfo.c @ 1007:65d35e66efb9 GasConsumption

Improve compass calibration dialog: The previous calibration dialog showed some "magic" numbers and a 60 second count down. The new version is trying to guide the user through the calibration process: first rotate pitch, then roll and at last yaw angle. A step to the next angle is taken when enough data per angle is collected (change from red to green). To enable the yaw visualization a simple calibration is done while rotating the axis. The function behind the calibration was not modified => the suggested process can be ignored and the same handling as the with old dialog may be applied. With the new process the dialog may be left early. Anyhow it will still be left after 60 seconds and the fine calibration is performed in the same way as before.
author Ideenmodellierer
date Mon, 05 May 2025 21:02:34 +0200
parents 92a5dc16d52b
children cd4561c33758
line wrap: on
line diff
--- a/Discovery/Src/tInfo.c	Sat May 03 17:52:05 2025 +0200
+++ b/Discovery/Src/tInfo.c	Mon May 05 21:02:34 2025 +0200
@@ -298,6 +298,32 @@
 
 }
 
+
+void tInfo_drawPixel(int16_t x, int16_t y, uint8_t color)
+{
+	int8_t xoff;
+	int8_t yoff;
+
+	for (xoff = -1; xoff < 2; xoff++)
+	{
+		for (yoff = -1; yoff < 2; yoff++)
+		{
+			GFX_draw_pixel(&tIscreen, x + xoff, y + yoff, color);
+		}
+	}
+	GFX_draw_pixel(&tIscreen, x, y, color);
+}
+
+void tInfo_draw_colorline(point_t start, point_t stop, uint8_t color)
+{
+	GFX_draw_colorline(&tIscreen, start, stop, color);
+}
+
+void t_Info_draw_circle(point_t center, uint8_t radius, int8_t color)
+{
+	GFX_draw_circle(&tIscreen, center, radius, color);
+}
+
 void tInfo_write_content_simple(uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle,  const tFont *Font, const char *text, uint8_t color)
 {
     GFX_DrawCfgWindow	hgfx;