Blender V5.0
GHOST_NDOFManagerUnix.cc File Reference
#include "GHOST_NDOFManagerUnix.hh"
#include "GHOST_System.hh"
#include "CLG_log.h"
#include <cstdio>
#include <spnav.h>
#include <unistd.h>

Go to the source code of this file.

Macros

#define MAX_LINE_LENGTH   100
#define USE_FINISH_GLITCH_WORKAROUND
#define MOTION_TEST_IDLE_MS   100

Variables

static const char * spnav_sock_path = "/var/run/spnav.sock"
static CLG_LogRef LOG = {"ghost.ndof"}
static bool motion_test_prev = false
static uint64_t motion_test_prev_time = 0

Macro Definition Documentation

◆ MAX_LINE_LENGTH

#define MAX_LINE_LENGTH   100

◆ MOTION_TEST_IDLE_MS

#define MOTION_TEST_IDLE_MS   100

Definition at line 86 of file GHOST_NDOFManagerUnix.cc.

Referenced by GHOST_NDOFManagerUnix::processEvents().

◆ USE_FINISH_GLITCH_WORKAROUND

#define USE_FINISH_GLITCH_WORKAROUND

Workaround for a problem where we don't enter the GHOST_kFinished state, this causes any proceeding event to have a very high dt (time delta), many seconds for eg, causing the view to jump.

this workaround expects continuous events, if we miss a motion event, immediately send a dummy event with no motion to ensure the finished state is reached.

Definition at line 70 of file GHOST_NDOFManagerUnix.cc.

Variable Documentation

◆ LOG

CLG_LogRef LOG = {"ghost.ndof"}
static

Definition at line 17 of file GHOST_NDOFManagerUnix.cc.

◆ motion_test_prev

bool motion_test_prev = false
static

Definition at line 74 of file GHOST_NDOFManagerUnix.cc.

Referenced by GHOST_NDOFManagerUnix::processEvents().

◆ motion_test_prev_time

uint64_t motion_test_prev_time = 0
static

Definition at line 75 of file GHOST_NDOFManagerUnix.cc.

Referenced by GHOST_NDOFManagerUnix::processEvents().

◆ spnav_sock_path

const char* spnav_sock_path = "/var/run/spnav.sock"
static