Skip to content

Commit

Permalink
Rename to splitboard
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisandreae committed Dec 1, 2020
1 parent 5a22f30 commit 3506f93
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 19 deletions.
4 changes: 2 additions & 2 deletions hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
#include "hardware/kinesis110.c"
#elif HARDWARE_VARIANT == ERGODOX
#include "hardware/ergodox.c"
#elif HARDWARE_VARIANT == KEYPAD
#include "hardware/keypad.c"
#elif HARDWARE_VARIANT == SPLITBOARD
#include "hardware/splitboard.c"
#else
#error "Unknown hardware variant selected"
#endif
6 changes: 3 additions & 3 deletions hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#define KINESIS 1
#define KINESIS110 2
#define ERGODOX 3
#define KEYPAD 4
#define SPLITBOARD 4

// Select the specific keyboard hardware
#if HARDWARE_VARIANT == KINESIS
Expand All @@ -58,8 +58,8 @@
#include "hardware/kinesis110.h"
#elif HARDWARE_VARIANT == ERGODOX
#include "hardware/ergodox.h"
#elif HARDWARE_VARIANT == KEYPAD
#include "hardware/keypad.h"
#elif HARDWARE_VARIANT == SPLITBOARD
#include "hardware/splitboard.h"
#else
#error "Unknown hardware variant selected"
#endif
Expand Down
2 changes: 1 addition & 1 deletion hardware/keypad.c → hardware/splitboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*/

#include <util/delay.h> /* for _delay_ms() */
#include "keypad.h"
#include "splitboard.h"


#define NO_LHS_KEY NO_KEY
Expand Down
7 changes: 4 additions & 3 deletions hardware/keypad.h → hardware/splitboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@

// But define different descriptive strings
#define USB_MANUFACTURER_STRING L"andreae.gen.nz"
#define USB_PRODUCT_STRING L"Programmable USB Keypad"
#define USB_SERIAL_NUMBER_STRING L"andreae.gen.nz:keypad"
#define USB_PRODUCT_STRING L"Programmable USB Splitboard"
#define USB_SERIAL_NUMBER_STRING L"andreae.gen.nz:splitboard"

// Unique identifier representing this keyboard's layout and
// definition of logical_keycode values. Is reported to the
Expand All @@ -78,7 +78,8 @@
#define NUM_LOGICAL_KEYS NUM_PHYSICAL_KEYS * 2
#define KEYPAD_LAYER_SIZE NUM_PHYSICAL_KEYS

// The The keyboard is two 8x8 matrixes driven simultaneously via a pair of 164/165 shift registers.
// Describes an ergodox-esque keyboard made up of two 8x8 matrixes driven
// simultaneously via a pair of 164/165 shift registers.

#define MATRIX_ROWS 8 // Drive side. On this keyboard, actually columns.
#define MATRIX_COLS 16 // Read side. On this keyboard, actually rows.
Expand Down
2 changes: 2 additions & 0 deletions qtclient/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Makefile
moc_*.cpp
qrc_*.cpp
*.dmg
*.app
compiler.pri
appdir
KeyboardClient
Expand Down
10 changes: 5 additions & 5 deletions qtclient/devicemock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static const unsigned char ergodox_default_mapping[152] = {
0xe8, 0xe9, 0xe6, 0xe4, 0x4b, 0x4e, 0x28, 0x2c
};

static const unsigned char ugboard_default_mapping[192] = {
static const unsigned char splitboard_default_mapping[192] = {
0x2c, 0xe4, 0x28, 0xe7, 0xe5, 0xe6, 0xff, 0x23,
0x1c, 0x0b, 0x11, 0xff, 0x3e, 0x24, 0x18, 0x0d,
0x10, 0x52, 0x3f, 0x25, 0x0c, 0x0e, 0x36, 0x51,
Expand Down Expand Up @@ -113,13 +113,13 @@ void DeviceMock::enumerateTo(KeyboardComm::DeviceList *target) {
append_mock(target,
QSharedPointer<Device>{
new DeviceMock(
"Mock UgBoard",
"Mock Splitboard",
3, // layout
sizeof(ugboard_default_mapping), // mapping size
sizeof(splitboard_default_mapping), // mapping size
2, 256, // programs
60, 256, 4, // macros
QByteArray(reinterpret_cast<const char*>(&ugboard_default_mapping[0]),
sizeof(ugboard_default_mapping)))});
QByteArray(reinterpret_cast<const char*>(&splitboard_default_mapping[0]),
sizeof(splitboard_default_mapping)))});
}

uint8_t DeviceSessionMock::getLayoutID() {
Expand Down
2 changes: 1 addition & 1 deletion qtclient/deviceusb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ static const struct {
} valid_ids[] = {
{0x16c0, 0x27db}, // VUSB IDs used by Kinesis modification
{0x1d50, 0x6028}, // IDs used by Ergodox
{0x16c0, 0x27dc}, // VUSB IDs used by ugboard
{0x16c0, 0x27dc}, // VUSB IDs used by splitboard
};

bool DeviceUSB::isValidID(const uint16_t vid, const uint16_t pid) {
Expand Down
2 changes: 1 addition & 1 deletion qtclient/layout/3.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<keyboard layout="ugboard" layoutid="3" image="ugboard.png"><layout>
<keyboard layout="splitboard" layoutid="3" image="splitboard.png"><layout>
<key name="0" w="50" h="50" x="652" y="328"/>
<key name="1" w="50" h="50" x="598" y="328"/>
<key name="2" w="50" h="50" x="544" y="328"/>
Expand Down
4 changes: 2 additions & 2 deletions qtclient/layout/generator/generate.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require_relative 'layout'

UGBOARD_LAYOUT = Layout.new(3, "ugboard") do
SPLITBOARD_LAYOUT = Layout.new(3, "splitboard") do
# Right thumb
square_matrix(2, 3, col_start: 12, row_start: 6, row_stride: +1, col_stride: -1, order: :rows)
# Right keywell
Expand All @@ -11,4 +11,4 @@
square_matrix(6, 7, col_start: 6, col_stride: -1, order: :cols)
end

UGBOARD_LAYOUT.dump
SPLITBOARD_LAYOUT.dump
File renamed without changes
2 changes: 1 addition & 1 deletion qtclient/qtclient.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<file>layout/2.xml</file>
<file>layout/ergodox.png</file>
<file>layout/3.xml</file>
<file>layout/ugboard.png</file>
<file>layout/splitboard.png</file>
</qresource>
</RCC>

0 comments on commit 3506f93

Please sign in to comment.