Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cb791cf6cd | ||
|
9ecfc23292 | ||
|
4549b0417e | ||
|
3a1a7d6472 | ||
|
7eccbfe737 | ||
|
732a115b32 | ||
|
b6c60333e4 | ||
|
0c351fa98b | ||
|
f0fc2db4e2 |
@@ -11,8 +11,6 @@ env:
|
||||
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
|
||||
before_install:
|
||||
- wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
- openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d
|
||||
- tar xvf secrets.tar
|
||||
install:
|
||||
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
- export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
|
||||
|
@@ -324,9 +324,10 @@ void process_action(keyrecord_t *record, action_t action)
|
||||
tp_buttons |= (1<<2);
|
||||
break;
|
||||
default:
|
||||
mousekey_on(action.key.code);
|
||||
mousekey_send();
|
||||
break;
|
||||
}
|
||||
mousekey_on(action.key.code);
|
||||
mousekey_send();
|
||||
} else {
|
||||
switch (action.key.code) {
|
||||
case KC_MS_BTN1:
|
||||
@@ -339,9 +340,10 @@ void process_action(keyrecord_t *record, action_t action)
|
||||
tp_buttons &= ~(1<<2);
|
||||
break;
|
||||
default:
|
||||
mousekey_off(action.key.code);
|
||||
mousekey_send();
|
||||
break;
|
||||
}
|
||||
mousekey_off(action.key.code);
|
||||
mousekey_send();
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
@@ -87,6 +87,7 @@ struct queue_item {
|
||||
uint16_t consumer;
|
||||
struct __attribute__((packed)) {
|
||||
int8_t x, y, scroll, pan;
|
||||
uint8_t buttons;
|
||||
} mousemove;
|
||||
};
|
||||
};
|
||||
@@ -699,6 +700,22 @@ static bool process_queue_item(struct queue_item *item, uint16_t timeout) {
|
||||
strcpy_P(fmtbuf, PSTR("AT+BLEHIDMOUSEMOVE=%d,%d,%d,%d"));
|
||||
snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->mousemove.x,
|
||||
item->mousemove.y, item->mousemove.scroll, item->mousemove.pan);
|
||||
if (!at_command(cmdbuf, NULL, 0, true, timeout)) {
|
||||
return false;
|
||||
}
|
||||
strcpy_P(cmdbuf, PSTR("AT+BLEHIDMOUSEBUTTON="));
|
||||
if (item->mousemove.buttons & MOUSE_BTN1) {
|
||||
strcat(cmdbuf, "L");
|
||||
}
|
||||
if (item->mousemove.buttons & MOUSE_BTN2) {
|
||||
strcat(cmdbuf, "R");
|
||||
}
|
||||
if (item->mousemove.buttons & MOUSE_BTN3) {
|
||||
strcat(cmdbuf, "M");
|
||||
}
|
||||
if (item->mousemove.buttons == 0) {
|
||||
strcat(cmdbuf, "0");
|
||||
}
|
||||
return at_command(cmdbuf, NULL, 0, true, timeout);
|
||||
#endif
|
||||
default:
|
||||
@@ -757,7 +774,7 @@ bool adafruit_ble_send_consumer_key(uint16_t keycode, int hold_duration) {
|
||||
|
||||
#ifdef MOUSE_ENABLE
|
||||
bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll,
|
||||
int8_t pan) {
|
||||
int8_t pan, uint8_t buttons) {
|
||||
struct queue_item item;
|
||||
|
||||
item.queue_type = QTMouseMove;
|
||||
@@ -765,6 +782,7 @@ bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll,
|
||||
item.mousemove.y = y;
|
||||
item.mousemove.scroll = scroll;
|
||||
item.mousemove.pan = pan;
|
||||
item.mousemove.buttons = buttons;
|
||||
|
||||
while (!send_buf.enqueue(item)) {
|
||||
send_buf_send_one();
|
||||
|
@@ -43,7 +43,7 @@ extern bool adafruit_ble_send_consumer_key(uint16_t keycode, int hold_duration);
|
||||
* The parameters are signed and indicate positive of negative direction
|
||||
* change. */
|
||||
extern bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll,
|
||||
int8_t pan);
|
||||
int8_t pan, uint8_t buttons);
|
||||
#endif
|
||||
|
||||
/* Compute battery voltage by reading an analog pin.
|
||||
|
@@ -669,7 +669,7 @@ static void send_mouse(report_mouse_t *report)
|
||||
if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
|
||||
#ifdef MODULE_ADAFRUIT_BLE
|
||||
// FIXME: mouse buttons
|
||||
adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h);
|
||||
adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h, report->buttons);
|
||||
#else
|
||||
bluefruit_serial_send(0xFD);
|
||||
bluefruit_serial_send(0x00);
|
||||
|
@@ -4,16 +4,18 @@ set -o errexit -o nounset
|
||||
|
||||
rev=$(git rev-parse --short HEAD)
|
||||
|
||||
git config --global user.name "Travis CI"
|
||||
git config --global user.email "jack.humb+travis.ci@gmail.com"
|
||||
if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then
|
||||
|
||||
git config --global user.name "QMK Bot"
|
||||
git config --global user.email "hello@qmk.fm"
|
||||
|
||||
openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d
|
||||
tar xvf secrets.tar
|
||||
|
||||
chmod 600 id_rsa_qmk_firmware
|
||||
chmod 600 qmk.fm
|
||||
eval `ssh-agent -s`
|
||||
ssh-add id_rsa_qmk_firmware
|
||||
ssh-add qmk.fm
|
||||
|
||||
if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then
|
||||
|
||||
increment_version ()
|
||||
{
|
||||
@@ -42,6 +44,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then
|
||||
cd ..
|
||||
git clone git@github.com:qmk/qmk.fm.git
|
||||
cd qmk.fm
|
||||
ssh-add ../qmk_firmware/qmk.fm
|
||||
#git submodule update --init --recursive
|
||||
#rm -rf keyboard
|
||||
#rm -rf keyboards
|
||||
@@ -55,7 +58,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then
|
||||
|
||||
git add -A
|
||||
git commit -m "generated from qmk/qmk_firmware@${rev}"
|
||||
git push git@github.com:qmk/qmk.fm.git master
|
||||
git push git@github.com:qmk/qmk.fm.git
|
||||
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user