12 lines
344 B
C++
12 lines
344 B
C++
#include "LowLevelMessages.h"
|
|
|
|
#include "../float16/float16.h"
|
|
|
|
void LowLevelMessages::SendFloat16(unsigned char *buffer, unsigned char *ix,
|
|
float value) {
|
|
float16 value16 = float16(value);
|
|
short binary = value16.getBinary();
|
|
|
|
buffer[(*ix)++] = (binary >> 8) & 0xFF;
|
|
buffer[(*ix)++] = binary & 0xFF;
|
|
} |