Skip to content

Floating Point Conversions #27

Closed
Closed
@sticilface

Description

@sticilface

I need to convert numbers entered in a browser (Strings) or sent by MQTT (char array) to a floating point number (double).

I've been trying and failing various ways, but I'm pretty new to C (only since i got hold of the beta for this) so i've failed.

Igrr has said that atof has not been implemented ... this is what is in core_esp8266_noniso.c

float atof_internal(const char* s)
{
  float result = 0;
  return result;
}

atol does work but I'd kinda like the decimals... ( i know i can just enter an integer and then divide...)

Does anyone have any ideas... or fancy giving me a quick patch for this.. I'd try.... infact i spent a few hours on it.. but I'm so new to arrays, pointers, and all this that i just fail....

Cheers

A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions