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.
|
||||
// a real floating point would at least have signed exponent.
|
||||
typedef struct {
|
||||
uint32_t sign :1;
|
||||
uint32_t mantissa :28;
|
||||
uint32_t exponent :3;
|
||||
uint32_t mantissa;
|
||||
uint8_t exponent :7;
|
||||
uint8_t sign :1;
|
||||
} decfloat;
|
||||
|
||||
// this holds all the possible data from a received command
|
||||
|
|
|
|||
Loading…
Reference in New Issue