Skip to content

Commit

Permalink
fixes for tf
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan committed Jul 28, 2023
1 parent 677231b commit 1ff686f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
15 changes: 7 additions & 8 deletions VortexTestingFramework/TestFramework.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "IRSimulator.h"
#include "EditorPipe.h"
#include "VortexLib.h"
#include "EngineDependencies/Arduino.h"

#include "Log/Log.h"

Expand Down Expand Up @@ -858,9 +857,9 @@ long TestFramework::TestFrameworkCallbacks::checkPinHook(uint32_t pin)
{
if (pin == 20) {
// orbit button 2
return Vortex::isButtonPressed(1) ? LOW : HIGH;
return Vortex::isButtonPressed(1) ? 0 : 1;
}
return Vortex::isButtonPressed(0) ? LOW : HIGH;
return Vortex::isButtonPressed(0) ? 0 : 1;
#if 0
// old code, this filtered by the LED_COUNT of the engine to avoid
// pin collisions where one engine is using a pin that another engine
Expand All @@ -869,26 +868,26 @@ long TestFramework::TestFrameworkCallbacks::checkPinHook(uint32_t pin)
switch (LED_COUNT) {
case 28: // orbit
if (pin == 19 && Vortex::isButtonPressed(0)) {
return LOW;
return 0;
}
if (pin == 20 && Vortex::isButtonPressed(1)) {
return LOW;
return 0;
}
break;
case 10: // glove
case 3: // handle
if (pin == 1 && Vortex::isButtonPressed()) {
return LOW;
return 0;
}
break;
case 2: // finger
if (pin == 9 && Vortex::isButtonPressed()) {
return LOW;
return 0;
}
default:
break;
}
return HIGH;
return 1;
#endif
}

Expand Down
5 changes: 2 additions & 3 deletions VortexTestingFramework/TestFrameworkLinux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <stdio.h>

#include "TestFrameworkLinux.h"
#include "Arduino.h"

#include "Log/Log.h"

Expand Down Expand Up @@ -565,9 +564,9 @@ long TestFramework::TestFrameworkCallbacks::checkPinHook(uint32_t pin)
{
if (pin == 20) {
// orbit button 2
return Vortex::isButtonPressed(1) ? LOW : HIGH;
return Vortex::isButtonPressed(1) ? 0 : 1;
}
return Vortex::isButtonPressed(0) ? LOW : HIGH;
return Vortex::isButtonPressed(0) ? 0 : 1;
}

void TestFramework::TestFrameworkCallbacks::ledsInit(void *cl, int count)
Expand Down
2 changes: 1 addition & 1 deletion VortexTestingFramework/VortexEngine

0 comments on commit 1ff686f

Please sign in to comment.