rename Str to St for structs to prevent taking them for strings
This commit is contained in:
parent
ac90df80cd
commit
b562f573b6
46
src/main.c
46
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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user