Porównaj commity

...

6 Commity
v1.1 ... master

Autor SHA1 Wiadomość Data
Chris Mayo 1850554b75 Fix SPNAV_EVENT_MOTION comparison with maxval 2023-12-28 01:38:47 +02:00
John Tsiombikas 7518e830c3 implemented missing repeat interval setting (requires latest libspnav) 2023-07-17 17:04:02 +03:00
John Tsiombikas 4d0fd40f39 autobuild: make sure to pull LFS data correctly 2023-03-11 23:49:42 +02:00
John Tsiombikas e9a11e97cc macosx auto-build: install pkg-config before attempting to build 2023-03-11 23:35:00 +02:00
Alberto Fanjul 676cb8e5a6 Add dominant axis button action 2023-02-22 20:16:26 +02:00
John Tsiombikas fd9aa10fb8 Make sure there are no duplicate object files. Closes issue #29 2023-01-08 21:49:12 +02:00
7 zmienionych plików z 37 dodań i 4 usunięć

Wyświetl plik

@ -12,6 +12,8 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: FreeBSD build
uses: vmactions/freebsd-vm@v0

Wyświetl plik

@ -12,6 +12,8 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: install dependencies
run: |

Wyświetl plik

@ -12,10 +12,12 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: install dependencies
run: |
brew install qt@5
brew install qt@5 pkg-config
brew link qt@5 --force
git clone https://github.com/FreeSpacenav/libspnav
cd libspnav

Wyświetl plik

@ -2,7 +2,7 @@ csrc = $(wildcard src/*.c)
ccsrc = $(wildcard src/*.cc)
mochdr = src/ui.h
mocsrc = $(mochdr:.h=.moc.cc)
obj = $(csrc:.c=.o) $(ccsrc:.cc=.o) $(mocsrc:.cc=.o) res.cc
obj = $(sort $(csrc:.c=.o) $(ccsrc:.cc=.o) $(mocsrc:.cc=.o)) res.cc
dep = $(csrc:.c=.d) $(ccsrc:.cc=.d)
bin = spnavcfg

Wyświetl plik

@ -82,6 +82,8 @@ int read_cfg(struct config *cfg)
}
}
cfg->repeat = spnav_cfg_get_repeat();
update_ui();
return 0;
}

Wyświetl plik

@ -162,6 +162,9 @@ bool MainWin::init()
connect(ui->ed_serpath, SIGNAL(editingFinished()), this, SLOT(serpath_changed()));
connect(ui->chk_serial, SIGNAL(stateChanged(int)), this, SLOT(chk_changed(int)));
connect(ui->chk_repeat, SIGNAL(stateChanged(int)), this, SLOT(chk_changed(int)));
connect(ui->spin_repeat, SIGNAL(valueChanged(int)), this, SLOT(spin_changed(int)));
/*
connect(ui->bn_loaddef, SIGNAL(clicked()), this, SLOT(bn_clicked()));
connect(ui->bn_loadcfg, SIGNAL(clicked()), this, SLOT(bn_clicked()));
@ -219,7 +222,7 @@ void MainWin::updateui()
} else {
ui->chk_serial->setChecked(false);
}
if(cfg.repeat > 0) {
if(cfg.repeat >= 0) {
ui->chk_repeat->setChecked(true);
ui->spin_repeat->setValue(cfg.repeat);
} else {
@ -322,7 +325,7 @@ void MainWin::spnav_input()
switch(ev.type) {
case SPNAV_EVENT_MOTION:
for(int i=0; i<6; i++) {
if(abs(ev.motion.data[i] > maxval)) maxval = abs(ev.motion.data[i]);
if(abs(ev.motion.data[i]) > maxval) maxval = abs(ev.motion.data[i]);
}
for(int i=0; i<6; i++) {
prog_axis[i]->setMinimum(-maxval);
@ -457,6 +460,13 @@ void MainWin::spin_changed(int val)
if(mask_events) return;
QObject *src = QObject::sender();
if(src == ui->spin_repeat) {
cfg.repeat = ui->spin_repeat->value();
spnav_cfg_set_repeat(cfg.repeat);
return;
}
if(src == ui->spin_dead) {
for(int i=0; i<devinfo.naxes; i++) {
if(cfg.dead_thres[i] != val) {
@ -492,6 +502,16 @@ void MainWin::chk_changed(int checked)
free(cfg.serdev);
cfg.serdev = 0;
spnav_cfg_set_serial(cfg.serdev);
return;
}
if(src == ui->chk_repeat) {
if(checked) {
cfg.repeat = ui->spin_repeat->value();
} else {
cfg.repeat = -1;
}
spnav_cfg_set_repeat(cfg.repeat);
}
if(src == ui->chk_swapyz) {

Wyświetl plik

@ -102,6 +102,11 @@
<string>Disable translation</string>
</property>
</item>
<item>
<property name="text">
<string>Dominant axis</string>
</property>
</item>
</widget>
</item>
<item>