Portál AbcLinuxu, 26. října 2025 17:48
if (temp<40) {
fprintf(f,"100");
#ifdef DEBUG
printf("PWM set to 100\n");
#endif
} else if (temp<50) {
fprintf(f,"150");
#ifdef DEBUG
printf("PWM set to 150\n");
#endif
} else if (temp<60) {
fprintf(f,"200");
#ifdef DEBUG
printf("PWM set to 200\n");
#endif
} else {
fprintf(f,"240");
#ifdef DEBUG
printf("PWM set to 240\n");
#endif
}
napsat nejak takhle:
if (temp<40) {
hodnota=100;
} else if (temp<50) {
hodnota=150;
} else if (temp<60) {
hodnota=200;
} else {
hodnota=240;
}
fprintf(f,hodnota);
#ifdef DEBUG
printf("PWM set to %d\n", hodnota);
#endif
sice uz ted jedu na 1600RPM, ale ten chladic by mel snest i min
Už jsem dlouho neviděl, aby byly v programu názvy funkcí česky a vypisované zprávy anglicky 

Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.