Skip to content

Use Github workflows to compile examples and spell check #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Compile Examples
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
fqbn: [
"arduino:samd:mkrwifi1010",
"arduino:samd:nano_33_iot",
"arduino:megaavr:uno2018:mode=on",
"arduino:mbed:nano33ble"
]

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: arduino/actions/libraries/compile-examples@master
with:
fqbn: ${{ matrix.fqbn }}
11 changes: 11 additions & 0 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Spell Check
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: arduino/actions/libraries/spell-check@master
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ArduinoBLE

[![Build Status](https://travis-ci.org/arduino-libraries/ArduinoBLE.svg?branch=master)](https://travis-ci.org/arduino-libraries/ArduinoBLE)
[![Compile Examples Status](https://github.com/arduino-libraries/ArduinoBLE/workflows/Compile%20Examples/badge.svg)](https://github.com/arduino-libraries/ArduinoBLE/actions?workflow=Compile+Examples) [![Spell Check Status](https://github.com/arduino-libraries/ArduinoBLE/workflows/Spell%Check/badge.svg)](https://github.com/arduino-libraries/ArduinoBLE/actions?workflow=Spell+Check)

Enables BLE connectivity on the Arduino MKR WiFi 1010, Arduino UNO WiFi Rev.2, Arduino Nano 33 IoT, and Arduino Nano 33 BLE.

Expand Down
2 changes: 1 addition & 1 deletion examples/Central/PeripheralExplorer/PeripheralExplorer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void exploreService(BLEService service) {
}

void exploreCharacteristic(BLECharacteristic characteristic) {
// print the UUID and properies of the characteristic
// print the UUID and properties of the characteristic
Serial.print("\tCharacteristic ");
Serial.print(characteristic.uuid());
Serial.print(", properties 0x");
Expand Down
20 changes: 10 additions & 10 deletions src/utility/ATT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,20 +519,20 @@ bool ATTClass::handleNotify(uint16_t handle, const uint8_t* value, int length)
continue;
}

uint8_t notication[_peers[i].mtu];
uint16_t noticationLength = 0;
uint8_t notification[_peers[i].mtu];
uint16_t notificationLength = 0;

notication[0] = ATT_OP_HANDLE_NOTIFY;
noticationLength++;
notification[0] = ATT_OP_HANDLE_NOTIFY;
notificationLength++;

memcpy(&notication[1], &handle, sizeof(handle));
noticationLength += sizeof(handle);
memcpy(&notification[1], &handle, sizeof(handle));
notificationLength += sizeof(handle);

length = min((uint16_t)(_peers[i].mtu - noticationLength), (uint16_t)length);
memcpy(&notication[noticationLength], value, length);
noticationLength += length;
length = min((uint16_t)(_peers[i].mtu - notificationLength), (uint16_t)length);
memcpy(&notification[notificationLength], value, length);
notificationLength += length;

HCI.sendAclPkt(_peers[i].connectionHandle, ATT_CID, noticationLength, notication);
HCI.sendAclPkt(_peers[i].connectionHandle, ATT_CID, notificationLength, notification);

numNotifications++;
}
Expand Down