Gast
#7511106
adc_value is real/float
This doesn't work
1 |
|
OR this
1 |
|
This works
1 |
|
2 |
|
Why, dos the first one always show 0?
|
Anzeige
|
Funktioniert sowas mit dem CubeMX oder GCC?
Gast
#7511106
adc_value is real/float This doesn't work
OR this
This works
Why, dos the first one always show 0? Schreib mal 4096.0 damit das eine float Division wird.
Gast
#7511110
Is ADC1_Get_Sample(1) an inteher and smaller than 4096? When yes the devision is done as integer. What types are you using?
Gast
#7511115
Das ist aber ein double, 4096.0f ist float.
Gast
#7511216
In Pascal ist es Float oder Real :-) In C double Antwort schreibenBitte melde dich an, um einen Beitrag zu schreiben. |
Anzeige
|