Skip to content

sprintf float output support #8

@laran002

Description

@laran002

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions