Skip to content

Commit

Permalink
fix optical power commands
Browse files Browse the repository at this point in the history
- wrong value which does not fit into 16 bit int for Zynq transmission
- also fix printout of `ff_optpow`
  • Loading branch information
pwittich committed Sep 4, 2024
1 parent 8b5971d commit 41075fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion projects/cm_mcu/FireflyUtils.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ float getFFoptpow(const uint8_t i, const uint8_t ch)
val = -999.f;
break;
}
return val * 10.f; // LSB is 0.1 uW, we return uW
return val * 0.1f; // LSB is 0.1 uW, we return uW
}
#undef SWAP_BYTES

Expand Down
2 changes: 1 addition & 1 deletion projects/cm_mcu/commands/SensorControl.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ BaseType_t ff_optpow(int argc, char **argv, char *m)
else {
copied += snprintf(m + copied, SCRATCH_SIZE - copied, "\r\n");
}
if ((SCRATCH_SIZE - copied) < 20) {
if ((SCRATCH_SIZE - copied) < 40) {
++i;
return pdTRUE;
}
Expand Down

0 comments on commit 41075fd

Please sign in to comment.