gcode_parse.h: grant mantissa full 32 bits.
This saves 280 bytes of binary size and probably quite a bit of processing time. Cost: 1 byte of RAM.
This commit is contained in:
parent
bdeb4827fc
commit
1a33cfddf6
|
|
@ -15,9 +15,9 @@
|
||||||
// this is a very crude decimal-based floating point structure.
|
// this is a very crude decimal-based floating point structure.
|
||||||
// a real floating point would at least have signed exponent.
|
// a real floating point would at least have signed exponent.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t sign :1;
|
uint32_t mantissa;
|
||||||
uint32_t mantissa :28;
|
uint8_t exponent :7;
|
||||||
uint32_t exponent :3;
|
uint8_t sign :1;
|
||||||
} decfloat;
|
} decfloat;
|
||||||
|
|
||||||
// this holds all the possible data from a received command
|
// this holds all the possible data from a received command
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue