From b562f573b6f5cac7891cf845b80bf759739c4d9b Mon Sep 17 00:00:00 2001 From: smayzy Date: Mon, 6 Apr 2026 13:09:28 +0200 Subject: [PATCH] rename Str to St for structs to prevent taking them for strings --- src/main.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/main.c b/src/main.c index cef1743..9e63983 100644 --- a/src/main.c +++ b/src/main.c @@ -25,29 +25,29 @@ typedef struct{ int hdata; int digits; WINDOW *lwin; -} StrInt; +} StInt; typedef struct{ float data; float ldata; float hdata; int digits; WINDOW *lwin; -} StrFlt; +} StFlt; typedef struct{ WINDOW *lwin; -} StrStr; +} StStr; typedef struct { - StrInt speed; - StrInt rpm; - StrFlt tq; - StrInt power; - StrFlt eff; - StrInt bat; - StrFlt bat_temp; - StrFlt var_temp; - StrFlt mot_temp; - StrStr message; + StInt speed; + StInt rpm; + StFlt tq; + StInt power; + StFlt eff; + StInt bat; + StFlt bat_temp; + StFlt var_temp; + StFlt mot_temp; + StStr message; } Tel; void get_fake_data(Tel *t) { @@ -335,16 +335,16 @@ int main(int argc, char **argv) { WINDOW *win[10]; Tel tel; - tel.speed = (StrInt){0, 0, 200, 3, NULL}; - tel.rpm = (StrInt){0, 0, 6000, 4, NULL}; - tel.tq = (StrFlt){0.0f, 1.8f, 3.5f, 3, NULL}; - tel.power = (StrInt){0, 0, 1300, 4, NULL}; - tel.eff = (StrFlt){0.0f, 0.0f, 300.0f, 5, NULL}; - tel.bat = (StrInt){0, 0, 100, 3, NULL}; - tel.bat_temp = (StrFlt){0.0f, 0.0f, 150.0f, 5, NULL}; - tel.var_temp = (StrFlt){0.0f, 0.0f, 150.0f, 5, NULL}; - tel.mot_temp = (StrFlt){0.0f, 0.0f, 150.0f, 5, NULL}; - tel.message = (StrStr){NULL}; + tel.speed = (StInt){0, 0, 200, 3, NULL}; + tel.rpm = (StInt){0, 0, 6000, 4, NULL}; + tel.tq = (StFlt){0.0f, 1.8f, 3.5f, 3, NULL}; + tel.power = (StInt){0, 0, 1300, 4, NULL}; + tel.eff = (StFlt){0.0f, 0.0f, 300.0f, 5, NULL}; + tel.bat = (StInt){0, 0, 100, 3, NULL}; + tel.bat_temp = (StFlt){0.0f, 0.0f, 150.0f, 5, NULL}; + tel.var_temp = (StFlt){0.0f, 0.0f, 150.0f, 5, NULL}; + tel.mot_temp = (StFlt){0.0f, 0.0f, 150.0f, 5, NULL}; + tel.message = (StStr){NULL}; int x3 = x / 3; int x3r = x - 2 * x3;