Skip to content

Commit

Permalink
Merge pull request #12
Browse files Browse the repository at this point in the history
Multiple Shape Display Support
  • Loading branch information
jdub233 authored Jul 3, 2024
2 parents ccec8f3 + 7fb55b3 commit 6e35ba2
Show file tree
Hide file tree
Showing 25 changed files with 512 additions and 249 deletions.
Binary file added bin/data/inFORM-escher-mode.mp4
Binary file not shown.
34 changes: 20 additions & 14 deletions neoForm.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
A7A38C1DAA6949FC9F8B48C0 /* will_mosq.c in Sources */ = {isa = PBXBuildFile; fileRef = 98278F7AD1AA612A8F4DDA10 /* will_mosq.c */; };
ACE7DC9A3223ED5EE1B80074 /* cameras.c in Sources */ = {isa = PBXBuildFile; fileRef = 3DBD37876A11E46E4D7069B3 /* cameras.c */; };
B006626C26FF99AB717C7CD4 /* utf8_mosq.c in Sources */ = {isa = PBXBuildFile; fileRef = D1822FF66A31138F103D3C2F /* utf8_mosq.c */; };
B94766EA2C3105CC00877064 /* InFormIOManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B94766E82C3105CC00877064 /* InFormIOManager.cpp */; };
B9A9F318297DF82000ACC2F8 /* KinectManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B9A9F2F5297DF82000ACC2F8 /* KinectManager.cpp */; };
B9A9F319297DF82000ACC2F8 /* SerialIOManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B9A9F2FA297DF82000ACC2F8 /* SerialIOManager.cpp */; };
B9A9F31A297DF82000ACC2F8 /* ShapeIOManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B9A9F2FD297DF82000ACC2F8 /* ShapeIOManager.cpp */; };
Expand Down Expand Up @@ -511,6 +512,8 @@
B88A80AA34B79BD6DA9253DE /* sse_utils.hpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; name = sse_utils.hpp; path = ../../../addons/ofxOpenCv/libs/opencv/include/opencv4/opencv2/core/sse_utils.hpp; sourceTree = SOURCE_ROOT; };
B8A2CBF3E24E6E5026B13A90 /* ofxBase3DVideo.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; name = ofxBase3DVideo.h; path = ../../../addons/ofxKinect/src/ofxBase3DVideo.h; sourceTree = SOURCE_ROOT; };
B8F39F6EBA0607ECB7D18D89 /* handle_disconnect.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.c; fileEncoding = 4; name = handle_disconnect.c; path = "../../../addons/ofxMQTT-1.5.0/libs/mosquitto/src/handle_disconnect.c"; sourceTree = SOURCE_ROOT; };
B94766E82C3105CC00877064 /* InFormIOManager.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InFormIOManager.cpp; sourceTree = "<group>"; };
B94766E92C3105CC00877064 /* InFormIOManager.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = InFormIOManager.hpp; sourceTree = "<group>"; };
B9A9F2F5297DF82000ACC2F8 /* KinectManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KinectManager.cpp; sourceTree = "<group>"; };
B9A9F2F6297DF82000ACC2F8 /* KinectManager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = KinectManager.hpp; sourceTree = "<group>"; };
B9A9F2F8297DF82000ACC2F8 /* PinConfigs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PinConfigs.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1980,15 +1983,17 @@
isa = PBXGroup;
children = (
B9A9F2F8297DF82000ACC2F8 /* PinConfigs.h */,
B9A9F2F9297DF82000ACC2F8 /* TransformIOManager.hpp */,
B94766E82C3105CC00877064 /* InFormIOManager.cpp */,
B94766E92C3105CC00877064 /* InFormIOManager.hpp */,
B9A9F2FE297DF82000ACC2F8 /* SerialIOManager.hpp */,
B9A9F2FA297DF82000ACC2F8 /* SerialIOManager.cpp */,
B9A9F2FB297DF82000ACC2F8 /* SerialShapeIO.hpp */,
B9A9F2FC297DF82000ACC2F8 /* SerialShapeIOManager.hpp */,
B9A9F2FD297DF82000ACC2F8 /* ShapeIOManager.cpp */,
B9A9F2FE297DF82000ACC2F8 /* SerialIOManager.hpp */,
B9A9F2FF297DF82000ACC2F8 /* SerialShapeIO.cpp */,
B9A9F2FC297DF82000ACC2F8 /* SerialShapeIOManager.hpp */,
B9A9F300297DF82000ACC2F8 /* SerialShapeIOManager.cpp */,
B9A9F301297DF82000ACC2F8 /* ShapeIOManager.hpp */,
B9A9F2FD297DF82000ACC2F8 /* ShapeIOManager.cpp */,
B9A9F2F9297DF82000ACC2F8 /* TransformIOManager.hpp */,
B9A9F302297DF82000ACC2F8 /* TransformIOManager.cpp */,
);
path = ShapeDisplayManagers;
Expand All @@ -2007,15 +2012,15 @@
isa = PBXGroup;
children = (
B9A9F308297DF82000ACC2F8 /* Application.hpp */,
B9A9F30E297DF82000ACC2F8 /* Application.cpp */,
B9A9F30F297DF82000ACC2F8 /* AxisChecker.hpp */,
B9A9F309297DF82000ACC2F8 /* AxisChecker.cpp */,
B9A9F30A297DF82000ACC2F8 /* MqttTransmissionApp.cpp */,
B9A9F30B297DF82000ACC2F8 /* VideoPlayerApp.cpp */,
B9A9F30C297DF82000ACC2F8 /* MqttTransmissionApp.hpp */,
B9A9F30A297DF82000ACC2F8 /* MqttTransmissionApp.cpp */,
B9A9F30D297DF82000ACC2F8 /* VideoPlayerApp.hpp */,
B9A9F30E297DF82000ACC2F8 /* Application.cpp */,
B9A9F30F297DF82000ACC2F8 /* AxisChecker.hpp */,
84B1DCFE2B792D8500DE7B7B /* KinectHandWavy.cpp */,
B9A9F30B297DF82000ACC2F8 /* VideoPlayerApp.cpp */,
84B1DCFF2B792D8500DE7B7B /* KinectHandWavy.hpp */,
84B1DCFE2B792D8500DE7B7B /* KinectHandWavy.cpp */,
B9A9F310297DF82000ACC2F8 /* DebuggingApps */,
);
path = Applications;
Expand All @@ -2024,12 +2029,12 @@
B9A9F310297DF82000ACC2F8 /* DebuggingApps */ = {
isa = PBXGroup;
children = (
B9A9F311297DF82000ACC2F8 /* KinectDebugApp.cpp */,
B9A9F312297DF82000ACC2F8 /* AxisCheckerApp.hpp */,
B9A9F313297DF82000ACC2F8 /* KinectDebugApp.hpp */,
B9A9F314297DF82000ACC2F8 /* AxisCheckerApp.cpp */,
84AEEE272A926C7700D26E7C /* DepthDebugApp.cpp */,
84AEEE282A926C7700D26E7C /* DepthDebugApp.hpp */,
84AEEE272A926C7700D26E7C /* DepthDebugApp.cpp */,
B9A9F311297DF82000ACC2F8 /* KinectDebugApp.cpp */,
B9A9F313297DF82000ACC2F8 /* KinectDebugApp.hpp */,
);
path = DebuggingApps;
sourceTree = "<group>";
Expand Down Expand Up @@ -2638,7 +2643,7 @@
attributes = {
LastUpgradeCheck = 1420;
};
buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "neoFORM" */;
buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "neoForm" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = en;
hasScannedForEncodings = 0;
Expand Down Expand Up @@ -2713,6 +2718,7 @@
F4135EEFC911E9ED211FB6F9 /* core.c in Sources */,
E55DEEF784A10419E444669E /* flags.c in Sources */,
B9A9F31F297DF82000ACC2F8 /* AxisChecker.cpp in Sources */,
B94766EA2C3105CC00877064 /* InFormIOManager.cpp in Sources */,
FCC16AB16073FF0581F50ED7 /* loader.c in Sources */,
D31F5C1B140C59B2AF1533A8 /* registration.c in Sources */,
49BEEB2DFA5319D55AA6899F /* tilt.c in Sources */,
Expand Down Expand Up @@ -3647,7 +3653,7 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "neoFORM" */ = {
E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "neoForm" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E4B69B4E0A3A1720003C02F2 /* Debug */,
Expand Down
61 changes: 31 additions & 30 deletions src/AppManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,22 @@ void AppManager::setup(){
timeOfLastUpdate = elapsedTimeInSeconds();

// set up applications
mqttApp = new MqttTransmissionApp();
mqttApp->setRefForShapeIOManager(m_serialShapeIOManager);
mqttApp = new MqttTransmissionApp(m_serialShapeIOManager);
applications["mqttTransmission"] = mqttApp;

videoPlayerApp = new VideoPlayerApp();
videoPlayerApp->setRefForShapeIOManager(m_serialShapeIOManager);
videoPlayerApp = new VideoPlayerApp(m_serialShapeIOManager);
applications["videoPlayer"] = videoPlayerApp;
videoPlayerApp->setup();

// set up debugging application
// and the debugging apps, too
axisCheckerApp = new AxisCheckerApp();
axisCheckerApp->setRefForShapeIOManager(m_serialShapeIOManager);
axisCheckerApp = new AxisCheckerApp(m_serialShapeIOManager);
applications["axisChecker"] = axisCheckerApp;

kinectDebugApp = new KinectDebugApp(kinectManager);
kinectDebugApp->setRefForShapeIOManager(m_serialShapeIOManager);
kinectDebugApp = new KinectDebugApp(m_serialShapeIOManager, kinectManager);
applications["kinectDebug"] = kinectDebugApp;

depthDebugApp = new DepthDebugApp();
depthDebugApp->setRefForShapeIOManager(m_serialShapeIOManager);
depthDebugApp = new DepthDebugApp(m_serialShapeIOManager);
applications["depthDebug"] = depthDebugApp;

kinectHandWavy = new KinectHandWavy(m_serialShapeIOManager,kinectManager);
Expand All @@ -72,35 +67,41 @@ void AppManager::setup(){
void AppManager::setupShapeDisplayManagement() {
// initialize communication with the shape display
// This is where the particulars of the shape display are set (i.e. TRANSFORM, inFORM, or any other physical layout).
m_serialShapeIOManager = new TransformIOManager(kinectManager);
string shapeDisplayToUse = "inFORM";

if (shapeDisplayToUse == "TRANSFORM") {
m_serialShapeIOManager = new TransformIOManager(kinectManager);
} else if (shapeDisplayToUse == "inFORM") {
m_serialShapeIOManager = new InFormIOManager(kinectManager);
} else {
throw "unknown shape display type: " + shapeDisplayToUse;
}

printf("Setting up Shape Display Management\n");

// Size the pin arrays correctly based on the hardware specific dimension, and initialize them with zero values
heightsForShapeDisplay = std::vector<std::vector<unsigned char>>(m_serialShapeIOManager->shapeDisplaySizeX, std::vector<unsigned char>(m_serialShapeIOManager->shapeDisplaySizeY));
heightsFromShapeDisplay = std::vector<std::vector<unsigned char>>(m_serialShapeIOManager->shapeDisplaySizeX, std::vector<unsigned char>(m_serialShapeIOManager->shapeDisplaySizeY));

// initialize shape display pin configs
PinConfigs pinConfigs;
pinConfigs.timeOfUpdate = elapsedTimeInSeconds();
pinConfigs.gainP = DEFAULT_GAIN_P;
pinConfigs.gainI = DEFAULT_GAIN_I;
pinConfigs.maxI = DEFAULT_MAX_I;
pinConfigs.deadZone = DEFAULT_DEAD_ZONE;
pinConfigs.maxSpeed = DEFAULT_MAX_SPEED;
pinConfigs.gainP = m_serialShapeIOManager->getGainP();
pinConfigs.gainI = m_serialShapeIOManager->getGainI();
pinConfigs.maxI = m_serialShapeIOManager->getMaxI();
pinConfigs.deadZone = m_serialShapeIOManager->getDeadZone();
pinConfigs.maxSpeed = m_serialShapeIOManager->getMaxSpeed();
m_serialShapeIOManager->setGlobalPinConfigs(pinConfigs);
timeOfLastPinConfigsUpdate = elapsedTimeInSeconds();

// clear height and pin config buffers
for (int x = 0; x < SHAPE_DISPLAY_SIZE_X; x++) {
for (int y = 0; y < SHAPE_DISPLAY_SIZE_Y; y++) {
heightsForShapeDisplay[x][y] = 0;
heightsFromShapeDisplay[x][y] = 0;
pinConfigsForShapeDisplay[x][y] = pinConfigs;
}
}

// Set the dimensions of the pinConfigs
pinConfigsForShapeDisplay.resize(m_serialShapeIOManager->shapeDisplaySizeX, std::vector<PinConfigs>(m_serialShapeIOManager->shapeDisplaySizeY, pinConfigs));

// allocate height pixels objects and clear contents
heightPixelsForShapeDisplay.allocate(SHAPE_DISPLAY_SIZE_X, SHAPE_DISPLAY_SIZE_Y, 1);
heightPixelsForShapeDisplay.allocate(m_serialShapeIOManager->shapeDisplaySizeX, m_serialShapeIOManager->shapeDisplaySizeY, 1);
heightPixelsForShapeDisplay.set(0);
heightPixelsFromShapeDisplay.allocate(SHAPE_DISPLAY_SIZE_X, SHAPE_DISPLAY_SIZE_Y, 1);
heightPixelsFromShapeDisplay.allocate(m_serialShapeIOManager->shapeDisplaySizeX, m_serialShapeIOManager->shapeDisplaySizeY, 1);
heightPixelsFromShapeDisplay.set(0);

// allocate shape display graphics container and clear contents
Expand All @@ -126,8 +127,8 @@ void AppManager::update(){
// note: manually looping over all pixels is important! the underlying
// ofPixels char array is stored as unsigned char[y][x], while the
// shape display heights are stored as unsigned char[x][y]
for (int x = 0; x < SHAPE_DISPLAY_SIZE_X; x++) {
for (int y = 0; y < SHAPE_DISPLAY_SIZE_Y; y++) {
for (int x = 0; x < m_serialShapeIOManager->shapeDisplaySizeX; x++) {
for (int y = 0; y < m_serialShapeIOManager->shapeDisplaySizeY; y++) {
int xy = heightPixelsFromShapeDisplay.getPixelIndex(x, y);
heightPixelsFromShapeDisplay[xy] = heightsFromShapeDisplay[x][y];
}
Expand All @@ -143,8 +144,8 @@ void AppManager::update(){
// note: manually looping over all pixels is important! the underlying
// ofPixels char array is stored as unsigned char[y][x], while the
// shape display heights are stored as unsigned char[x][y]
for (int x = 0; x < SHAPE_DISPLAY_SIZE_X; x++) {
for (int y = 0; y < SHAPE_DISPLAY_SIZE_Y; y++) {
for (int x = 0; x < m_serialShapeIOManager->shapeDisplaySizeX; x++) {
for (int y = 0; y < m_serialShapeIOManager->shapeDisplaySizeY; y++) {
int xy = heightPixelsForShapeDisplay.getPixelIndex(x, y);
heightsForShapeDisplay[x][y] = heightPixelsForShapeDisplay[xy];
}
Expand Down
6 changes: 3 additions & 3 deletions src/AppManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ class AppManager : public ofBaseApp {
// I/O data buffers

// maybe rename to serialHeightOutput()
unsigned char heightsForShapeDisplay[SHAPE_DISPLAY_SIZE_X][SHAPE_DISPLAY_SIZE_Y];
std::vector<std::vector<unsigned char>> heightsForShapeDisplay;
// maybe rename to serialHeightInput()
unsigned char heightsFromShapeDisplay[SHAPE_DISPLAY_SIZE_X][SHAPE_DISPLAY_SIZE_Y];
std::vector<std::vector<unsigned char>> heightsFromShapeDisplay;
ofPixels heightPixelsForShapeDisplay;
ofPixels heightPixelsFromShapeDisplay;
PinConfigs pinConfigsForShapeDisplay[SHAPE_DISPLAY_SIZE_X][SHAPE_DISPLAY_SIZE_Y];
std::vector<std::vector<PinConfigs>> pinConfigsForShapeDisplay;
ofFbo graphicsForShapeDisplay;
ofPixels colorPixels;
ofPixels depthPixels;
Expand Down
17 changes: 8 additions & 9 deletions src/Applications/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
#include "Application.hpp"

Application::Application() {
heightsForShapeDisplay.allocate(SHAPE_DISPLAY_SIZE_X, SHAPE_DISPLAY_SIZE_Y, OF_IMAGE_GRAYSCALE);
heightsForShapeDisplay.set(0);
heightsDrawingBuffer.allocate(SHAPE_DISPLAY_SIZE_X, SHAPE_DISPLAY_SIZE_Y);
// Default constructor
};

Application::Application(SerialShapeIOManager *theCustomShapeDisplayManager){
heightsForShapeDisplay.allocate(SHAPE_DISPLAY_SIZE_X, SHAPE_DISPLAY_SIZE_Y, OF_IMAGE_GRAYSCALE);
heightsForShapeDisplay.set(0);
heightsDrawingBuffer.allocate(SHAPE_DISPLAY_SIZE_X, SHAPE_DISPLAY_SIZE_Y);

m_CustomShapeDisplayManager = theCustomShapeDisplayManager;

heightsForShapeDisplay.allocate(theCustomShapeDisplayManager->shapeDisplaySizeX, theCustomShapeDisplayManager->shapeDisplaySizeY, OF_IMAGE_GRAYSCALE);
heightsForShapeDisplay.set(0);
heightsDrawingBuffer.allocate(theCustomShapeDisplayManager->shapeDisplaySizeX, theCustomShapeDisplayManager->shapeDisplaySizeY);

}

void Application::setRefForShapeIOManager(SerialShapeIOManager* customIOManager){
Expand All @@ -30,9 +30,8 @@ void Application::getHeightsForShapeDisplay(ofPixels &heights) {
heights = heightsForShapeDisplay;
};

void Application::getPinConfigsForShapeDisplay(PinConfigs configs[SHAPE_DISPLAY_SIZE_X][SHAPE_DISPLAY_SIZE_Y]) {
PinConfigs *src = (PinConfigs *) pinConfigsForShapeDisplay;
copy(src, src + SHAPE_DISPLAY_SIZE_2D, (PinConfigs *) configs);
void Application::getPinConfigsForShapeDisplay(std::vector<std::vector<PinConfigs>>& configs) {
pinConfigsForShapeDisplay = configs;
};

void Application::setHeightsFromShapeDisplayRef(const ofPixels *heights) {
Expand Down
5 changes: 3 additions & 2 deletions src/Applications/Application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "PinConfigs.h"
#include "../ShapeDisplayManagers/ShapeIOManager.hpp"
#include "../ShapeDisplayManagers/TransformIOManager.hpp"
#include "../ShapeDisplayManagers/InFormIOManager.hpp"

class Application {
public:
Expand All @@ -23,7 +24,7 @@ class Application {
Application(SerialShapeIOManager *theCustomShapeDisplayManager);

void getHeightsForShapeDisplay(ofPixels &heights);
void getPinConfigsForShapeDisplay(PinConfigs configs[SHAPE_DISPLAY_SIZE_X][SHAPE_DISPLAY_SIZE_Y]);
void getPinConfigsForShapeDisplay(std::vector<std::vector<PinConfigs>>& configs);
void setHeightsFromShapeDisplayRef(const ofPixels *heights);
void setPixelsFromKinectRefs(const ofPixels *colorPixels, const ofPixels *depthPixels);

Expand All @@ -48,7 +49,7 @@ class Application {
protected:

ofPixels heightsForShapeDisplay;
PinConfigs pinConfigsForShapeDisplay[SHAPE_DISPLAY_SIZE_X][SHAPE_DISPLAY_SIZE_Y];
std::vector<std::vector<PinConfigs>> pinConfigsForShapeDisplay;
const ofPixels *heightsFromShapeDisplay;
bool hasHeightsFromShapeDisplay = false;

Expand Down
23 changes: 13 additions & 10 deletions src/Applications/DebuggingApps/AxisCheckerApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,27 @@

#include "AxisCheckerApp.hpp"

AxisCheckerApp::AxisCheckerApp(SerialShapeIOManager *theSerialShapeIOManager) : Application(theSerialShapeIOManager) {
cout << "AxisCheckerApp constructor" << endl;
}

void AxisCheckerApp::update(float dt) {
normalizedPhase += dt * 0.5;
tally++;
tally %= SHAPE_DISPLAY_SIZE_X + SHAPE_DISPLAY_SIZE_Y;
tally %= m_CustomShapeDisplayManager->shapeDisplaySizeX + m_CustomShapeDisplayManager->shapeDisplaySizeY;
updateHeights();
}

void AxisCheckerApp::updateHeights() {
if (checkerboard) {
for (int x = 0; x < SHAPE_DISPLAY_SIZE_X; x++) {
for (int y = 0; y < SHAPE_DISPLAY_SIZE_Y; y++) {
for (int x = 0; x < m_CustomShapeDisplayManager->shapeDisplaySizeX; x++) {
for (int y = 0; y < m_CustomShapeDisplayManager->shapeDisplaySizeY; y++) {
int height;
if (x < SHAPE_DISPLAY_SIZE_X / 2 && y < SHAPE_DISPLAY_SIZE_Y / 2) {
if (x < m_CustomShapeDisplayManager->shapeDisplaySizeX / 2 && y < m_CustomShapeDisplayManager->shapeDisplaySizeY / 2) {
height = 40;
} else if (x < SHAPE_DISPLAY_SIZE_X / 2) {
} else if (x < m_CustomShapeDisplayManager->shapeDisplaySizeX / 2) {
height = 250;
} else if (y < SHAPE_DISPLAY_SIZE_Y / 2) {
} else if (y < m_CustomShapeDisplayManager->shapeDisplaySizeY / 2) {
height = 110;
} else {
height = 180;
Expand All @@ -34,13 +37,13 @@ void AxisCheckerApp::updateHeights() {
}
}
} else {
for (int x = 0; x < SHAPE_DISPLAY_SIZE_X; x++) {
for (int y = 0; y < SHAPE_DISPLAY_SIZE_Y; y++) {
for (int x = 0; x < m_CustomShapeDisplayManager->shapeDisplaySizeX; x++) {
for (int y = 0; y < m_CustomShapeDisplayManager->shapeDisplaySizeY; y++) {
int height;
if (tally < SHAPE_DISPLAY_SIZE_X) {
if (tally < m_CustomShapeDisplayManager->shapeDisplaySizeX) {
height = x == tally ? 255 : 0;
} else {
height = SHAPE_DISPLAY_SIZE_X + y == tally ? 255 : 0;
height = m_CustomShapeDisplayManager->shapeDisplaySizeX + y == tally ? 255 : 0;
}
int xy = heightsForShapeDisplay.getPixelIndex(x, y);
heightsForShapeDisplay[xy] = height;
Expand Down
1 change: 1 addition & 0 deletions src/Applications/DebuggingApps/AxisCheckerApp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

class AxisCheckerApp : public Application {
public:
AxisCheckerApp(SerialShapeIOManager *theCustomShapeDisplayManager);
void update(float dt);
void drawGraphicsForShapeDisplay(int x, int y, int width, int height);
string appInstructionsText();
Expand Down
3 changes: 3 additions & 0 deletions src/Applications/DebuggingApps/DepthDebugApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

#include "DepthDebugApp.hpp"

DepthDebugApp::DepthDebugApp(SerialShapeIOManager *theCustomShapeDisplayManager) : Application(theCustomShapeDisplayManager) {
cout << "DepthDebugApp constructor" << endl;
}

void DepthDebugApp::update(float dt) {
cout << "hello there debug depth";
Expand Down
2 changes: 2 additions & 0 deletions src/Applications/DebuggingApps/DepthDebugApp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

class DepthDebugApp : public Application {
public:
DepthDebugApp(SerialShapeIOManager *theCustomShapeDisplayManager);

void update(float dt);
void drawGraphicsForShapeDisplay(int x, int y, int width, int height);
string appInstructionsText();
Expand Down
Loading

0 comments on commit 6e35ba2

Please sign in to comment.