Search found 3 matches

by DeSantis
Thu Jul 17, 2014 4:03 pm
Forum: STM32 Support
Topic: STM32 - Cast from icucnt_t to float
Replies: 5
Views: 4870

Re: STM32 - Cast from icucnt_t to float

Yes it is, infact if i put the mouse on "last_width" in debug mode, i can see the right value

thank you
by DeSantis
Thu Jul 17, 2014 1:44 pm
Forum: STM32 Support
Topic: STM32 - Cast from icucnt_t to float
Replies: 5
Views: 4870

Re: STM32 - Cast from icucnt_t to float

Hi Giovanni,

static void icuwidthcb(ICUDriver *icup) {

palSetPad(GPIOD, GPIOD_LED4);
last_width =icuGetWidth(icup);
}

icucnt_t last_width;

static void SRF05init(){

uint16_t distance = 0;

distance= last_width/58;
}

Distance is always 0 and say me the warning "optimized out".

Thank's for ...
by DeSantis
Thu Jul 17, 2014 1:16 pm
Forum: STM32 Support
Topic: STM32 - Cast from icucnt_t to float
Replies: 5
Views: 4870

STM32 - Cast from icucnt_t to float

Hi,
i'm using ICUDriver on STM32f4 but i have a problem when i try to read the return value from "icuGetWidth(icup)" function.
In particular, i can't cast this value to int or float.