Skip to content

Format of floating point numbers causes excessive heating. #1

@thilokru

Description

@thilokru

req = self._http_request(sv_reqests[self.channel]+str(voltage))

Here, the desired voltage is sent to the device. To do this, the floating point number is converted into a string.

This works fine for large enough numbers. They will be formatted into something like 0.0000123.

If the number becomes sufficiently small though, it will be converted into scientific notation: 3.12...e-12

It looks like the ControlByWeb device does not parse the e-12 and sets a voltage of 3.12... Volts, which causes excessive heating.

A potential fix would set a fixed format of the number, forbidding scientific notation.

Otherwise, P should not be lower than 1e-5

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