mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-07-28 09:53:45 +02:00
improve current sense sampling on AVR
This commit is contained in:
@@ -226,7 +226,7 @@ int MotorDriver::getCurrentRaw() {
|
||||
// noInterrupts();
|
||||
//current = analogRead(currentPin)-senseOffset;
|
||||
current = sampleCurrent-senseOffset;
|
||||
DIAG(F("%d %d"), current, sampleCurrentTimestamp);
|
||||
//DIAG(F("%d %d"), current, sampleCurrentTimestamp);
|
||||
if ((millis() - sampleCurrentTimestamp) > 3)
|
||||
DIAG(F("Current sample old %d"), millis() - sampleCurrentTimestamp);
|
||||
//interrupts();
|
||||
|
Reference in New Issue
Block a user