Speeduino
Loading...
Searching...
No Matches
units.h
Go to the documentation of this file.
1#pragma once
2
8#include <stdint.h>
9#include "maths.h"
10
14
15/* TO DO: store *all* temps in storage units: *only* convert to display units during I/O.
16This will avoid a lot of conversions (speed, simplicity) */
17
28
static uint32_t rshift(uint32_t a)
Bitwise right shift - generic, unoptimized, case.
Definition bit_shifts.h:349
static constexpr uint8_t temperatureAddOffset(int16_t temperature)
Convert an internal temperature value (-40 to 215°C) to a storage value (0-255).
Definition units.h:24
constexpr int16_t CALIBRATION_TEMPERATURE_OFFSET
Definition units.h:13
static constexpr int16_t temperatureRemoveOffset(uint8_t temperature)
Convert a storage value (0-255) to an internal temperature value (-40 to 215°C).
Definition units.h:37