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 hdata;
|
||||||
int digits;
|
int digits;
|
||||||
WINDOW *lwin;
|
WINDOW *lwin;
|
||||||
} StrInt;
|
} StInt;
|
||||||
typedef struct{
|
typedef struct{
|
||||||
float data;
|
float data;
|
||||||
float ldata;
|
float ldata;
|
||||||
float hdata;
|
float hdata;
|
||||||
int digits;
|
int digits;
|
||||||
WINDOW *lwin;
|
WINDOW *lwin;
|
||||||
} StrFlt;
|
} StFlt;
|
||||||
typedef struct{
|
typedef struct{
|
||||||
WINDOW *lwin;
|
WINDOW *lwin;
|
||||||
} StrStr;
|
} StStr;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
StrInt speed;
|
StInt speed;
|
||||||
StrInt rpm;
|
StInt rpm;
|
||||||
StrFlt tq;
|
StFlt tq;
|
||||||
StrInt power;
|
StInt power;
|
||||||
StrFlt eff;
|
StFlt eff;
|
||||||
StrInt bat;
|
StInt bat;
|
||||||
StrFlt bat_temp;
|
StFlt bat_temp;
|
||||||
StrFlt var_temp;
|
StFlt var_temp;
|
||||||
StrFlt mot_temp;
|
StFlt mot_temp;
|
||||||
StrStr message;
|
StStr message;
|
||||||
} Tel;
|
} Tel;
|
||||||
|
|
||||||
void get_fake_data(Tel *t) {
|
void get_fake_data(Tel *t) {
|
||||||
@ -335,16 +335,16 @@ int main(int argc, char **argv) {
|
|||||||
WINDOW *win[10];
|
WINDOW *win[10];
|
||||||
|
|
||||||
Tel tel;
|
Tel tel;
|
||||||
tel.speed = (StrInt){0, 0, 200, 3, NULL};
|
tel.speed = (StInt){0, 0, 200, 3, NULL};
|
||||||
tel.rpm = (StrInt){0, 0, 6000, 4, NULL};
|
tel.rpm = (StInt){0, 0, 6000, 4, NULL};
|
||||||
tel.tq = (StrFlt){0.0f, 1.8f, 3.5f, 3, NULL};
|
tel.tq = (StFlt){0.0f, 1.8f, 3.5f, 3, NULL};
|
||||||
tel.power = (StrInt){0, 0, 1300, 4, NULL};
|
tel.power = (StInt){0, 0, 1300, 4, NULL};
|
||||||
tel.eff = (StrFlt){0.0f, 0.0f, 300.0f, 5, NULL};
|
tel.eff = (StFlt){0.0f, 0.0f, 300.0f, 5, NULL};
|
||||||
tel.bat = (StrInt){0, 0, 100, 3, NULL};
|
tel.bat = (StInt){0, 0, 100, 3, NULL};
|
||||||
tel.bat_temp = (StrFlt){0.0f, 0.0f, 150.0f, 5, NULL};
|
tel.bat_temp = (StFlt){0.0f, 0.0f, 150.0f, 5, NULL};
|
||||||
tel.var_temp = (StrFlt){0.0f, 0.0f, 150.0f, 5, NULL};
|
tel.var_temp = (StFlt){0.0f, 0.0f, 150.0f, 5, NULL};
|
||||||
tel.mot_temp = (StrFlt){0.0f, 0.0f, 150.0f, 5, NULL};
|
tel.mot_temp = (StFlt){0.0f, 0.0f, 150.0f, 5, NULL};
|
||||||
tel.message = (StrStr){NULL};
|
tel.message = (StStr){NULL};
|
||||||
|
|
||||||
int x3 = x / 3;
|
int x3 = x / 3;
|
||||||
int x3r = x - 2 * x3;
|
int x3r = x - 2 * x3;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user