some fixes

This commit is contained in:
2026-09-03 16:22:24 +03:00
parent ae999fcd48
commit d2463f759b
8 changed files with 154 additions and 112 deletions

View File

@@ -52,6 +52,9 @@
// REG_STATUS_EXT bit
#define STATUS_READY_MASK 0x01
#define FREQ_SCALE 100.
// convert rev/min to frequency register value and back
// 100 * revmin / 60 * 4; 100 - scale, 60 - min2sec, 4 - pole amount
#define REVMIN2FREQ(r) (uint16_t)((100. * (r)) / 15.)
#define FREQ2REVMIN(f) ((((double)(f)) * 15.) / 100.)
#define CURRENT_SCALE 10.