Laser Coolant Flow Meter / Safety Shutdown (#21431)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Mike La Spina
2021-03-29 01:41:56 -05:00
committed by Scott Lahteine
parent 9f48314cb4
commit f1986545da
20 changed files with 512 additions and 173 deletions

View File

@@ -177,6 +177,15 @@ const char* i16tostr4signrj(const int16_t i) {
return &conv[3];
}
// Convert unsigned float to string with 1.1 format
const char* ftostr11ns(const float &f) {
const long i = UINTFLOAT(f, 1);
conv[4] = DIGIMOD(i, 10);
conv[5] = '.';
conv[6] = DIGIMOD(i, 1);
return &conv[4];
}
// Convert unsigned float to string with 1.23 format
const char* ftostr12ns(const float &f) {
const long i = UINTFLOAT(f, 2);

View File

@@ -61,6 +61,9 @@ const char* i16tostr3left(const int16_t xx);
// Convert signed int to rj string with _123, -123, _-12, or __-1 format
const char* i16tostr4signrj(const int16_t x);
// Convert unsigned float to string with 1.2 format
const char* ftostr11ns(const float &x);
// Convert unsigned float to string with 1.23 format
const char* ftostr12ns(const float &x);