Open laran002 opened 3 years ago
Problem: I am having issues with printing floating point output.
This line: sprintf(dist_str, "dist (%u): %3.2f m\n",frame_seq_nb_rx, (float)(distance)); printk("%s", dist_str);
sprintf(dist_str, "dist (%u): %3.2f m\n",frame_seq_nb_rx, (float)(distance));
printk("%s", dist_str);
Outputs this: dist (0): %3.2f m\n
dist (0): %3.2f m\n
Possible Solution: I added CONFIG_FPU=y in prj.conf to enable floating point support.
Action: If you think this is a valid solution I can generate a pull request to fix it
thanks that's work with me
Another solution is to add CONFIG_CBPRINTF_FP_SUPPORT=y to prj.conf.
CONFIG_CBPRINTF_FP_SUPPORT=y
Problem: I am having issues with printing floating point output.
This line:
sprintf(dist_str, "dist (%u): %3.2f m\n",frame_seq_nb_rx, (float)(distance));
printk("%s", dist_str);
Outputs this:
dist (0): %3.2f m\n
Possible Solution: I added CONFIG_FPU=y in prj.conf to enable floating point support.
Action: If you think this is a valid solution I can generate a pull request to fix it