Browse Source

Fire shutter works now

master
squeaky otter 5 months ago
parent
commit
83cd168a54
  1. 21
      .vscode/launch.json
  2. 2
      Makefile
  3. 4
      NOTES.md
  4. 3
      README.md
  5. 2
      src/nikonDatalink.cpp

21
.vscode/launch.json

@ -4,12 +4,31 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/pikon",
"args": ["-p", "/dev/ttyUSB0", "fire_shutter"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/pikon",
"args": ["-p", "/dev/ttyUSB0"],
"args": ["-p", "/dev/ttyUSB0", "fire_shutter"],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],

2
Makefile

@ -17,7 +17,7 @@ INC_FLAGS := $(addprefix -I,$(INC_DIRS))
FLAGS_LIBSERIALPORT = $(shell pkg-config --cflags libserialport)
LIBS_LIBSERIALPORT = $(shell pkg-config --libs libserialport)
CPPFLAGS ?= $(INC_FLAGS) -MMD -MP -std=c++11 $(FLAGS_LIBSERIALPORT) -DLOG_USE_COLOR -O0
CPPFLAGS ?= $(INC_FLAGS) -MMD -MP $(FLAGS_LIBSERIALPORT) -DLOG_USE_COLOR -O0 -ggdb -fno-inline
$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) -o $@ $(LOADLIBES) $(LDLIBS) $(LIBS_LIBSERIALPORT)

4
NOTES.md

@ -1,5 +1 @@
# Various notes and interrogations
## Focus / Fire Shutter
So what's the difference ? Focus fails, but Fire Shutter (even if it segfaults), do trigger focusing (at least), hmmm

3
README.md

@ -19,10 +19,11 @@ git submodule update
### Working
- Nikon INQUIRY (camera identification)
- Fire shutter (tested on N90s)
### Broken
- Switch to 9600bps (don't work)
- Sending focusing command (segfault, might be related to baud switch)
- Sending focusing command (does nothing, sessionError)
- Everything else
### TODO

2
src/nikonDatalink.cpp

@ -411,9 +411,9 @@ int NikonDatalink::sendCommand(int mode, unsigned long address, void *buf, int s
size -= partial;
// (unsigned char *) buf += partial;
*(unsigned char **) buf += partial;
// https://stackoverflow.com/a/23069563/465146
// https://clang.llvm.org/compatibility.html#lvalue-cast
buf += partial;
address += partial;
} while (size > 0);

Loading…
Cancel
Save