IR volt debugging

This commit is contained in:
Alex Voinea 2022-02-22 15:26:11 +01:00 committed by D.R.racer
parent f03922f7cf
commit 338f1f7615
1 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,7 @@
#include <inttypes.h>
#include <stdio.h>
#include <avr/pgmspace.h>
#include <util/atomic.h>
#include "Marlin.h"
#include "ultralcd.h"
@ -136,6 +137,14 @@ public:
void update() {
IR_sensor::update();
if (voltReady) {
uint16_t newVoltRaw;
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
newVoltRaw = voltRaw;
voltReady = false;
}
printf_P(PSTR("newVoltRaw:%u\n"), newVoltRaw / OVERSAMPLENR);
}
;//
}