Pending video release

This commit is contained in:
Hakan Bastedt
2023-12-29 15:05:23 +01:00
parent 2a1111c537
commit 5abaf4ace7
2 changed files with 5 additions and 13 deletions

View File

@@ -56,7 +56,7 @@ void cb_get_inputs(void) // Set Master inputs, slave outputs, last operation
nFires++;
PreviousEncoderCounterValue = 0;
}
uint64_t now = micros();
uint64_t now = micros(); // Exploring the cycle times
Obj.DiffT = now - Prev2Time;
Prev2Time = PrevTime;
PrevTime = now;
@@ -76,14 +76,6 @@ void cb_get_inputs(void) // Set Master inputs, slave outputs, last operation
}
Obj.EncFrequency = diffT != 0 ? diffPos / diffT : 0.0; // Revolutions per second
Obj.IndexStatus = 0;
if (indexPulseFired)
{
Obj.IndexStatus = 1;
indexPulseFired = 0;
nFires++;
PreviousEncoderCounterValue = 0;
}
Obj.IndexByte = digitalRead(INDEX_PIN);
if (Obj.IndexByte)
Serial1.printf("IS 1\n");