USB logging

This commit is contained in:
Jan Käberich 2022-10-31 22:06:23 +01:00
parent 69f7c878b9
commit f3eb560d61
16 changed files with 731 additions and 12 deletions

View file

@ -88,6 +88,25 @@ public:
return std::numeric_limits<std::complex<double>>::quiet_NaN();
}
class Value {
public:
std::complex<double> value;
uint8_t flags;
};
Value getValue(unsigned int index) {
Value v;
v.value = 0.0;
v.flags = 0;
if(index <= num_values) {
v.value = std::complex<double>(real_values[index], imag_values[index]);
v.flags = descr_values[index];
}
return v;
}
unsigned int getNumValues() {
return num_values;
}
uint16_t requiredBufferSize() {
return 8+2+2+ num_values * (4+4+1);
}