Skip to content

Commit

Permalink
Log device info when starting calibration
Browse files Browse the repository at this point in the history
  • Loading branch information
pushrax committed Oct 25, 2020
1 parent 6389d74 commit 8e6796a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions OpenVR-SpaceCalibrator/Calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,16 @@ void CalibrationTick(double time)
{
bool ok = true;

char referenceSerial[256], targetSerial[256];
vr::VRSystem()->GetStringTrackedDeviceProperty(ctx.referenceID, vr::Prop_SerialNumber_String, referenceSerial, 256);
vr::VRSystem()->GetStringTrackedDeviceProperty(ctx.targetID, vr::Prop_SerialNumber_String, targetSerial, 256);

char buf[256];
snprintf(buf, sizeof buf, "Reference device ID: %d, serial: %s\n", ctx.referenceID, referenceSerial);
CalCtx.Log(buf);
snprintf(buf, sizeof buf, "Target device ID: %d, serial %s\n", ctx.targetID, targetSerial);
CalCtx.Log(buf);

if (ctx.referenceID == -1)
{
CalCtx.Log("Missing reference device\n"); ok = false;
Expand Down Expand Up @@ -433,9 +443,7 @@ void CalibrationTick(double time)
ctx.state = CalibrationState::Rotation;
ctx.wantedUpdateInterval = 0.0;

char buf[256];
snprintf(buf, sizeof buf, "Starting calibration, referenceID=%d targetID=%d\n", ctx.referenceID, ctx.targetID);
CalCtx.Log(buf);
CalCtx.Log("Starting calibration...\n");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion OpenVR-SpaceCalibrator/UserInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <algorithm>
#include <imgui/imgui.h>

#define VERSION_STRING "1.1"
#define VERSION_STRING "1.2"

struct VRDevice
{
Expand Down

0 comments on commit 8e6796a

Please sign in to comment.