abandonware / noble

A Node.js BLE (Bluetooth Low Energy) central module : Community maintained
https://libraries.io/npm/@abandonware%2Fnoble
MIT License
538 stars 162 forks source link

Fix MTU for peripheral #308

Closed Apollon77 closed 1 year ago

Apollon77 commented 1 year ago

The current version has two issues regarding MTU: 1.) Mising in types 2.) It is never set because the code only updates mtu if the peripheral.mtu is not falsy (what the default value null always is) so it was never updated. I decided to remove this check. This could lead to the fact that the MTU could get updated after initially set which could be strange ... but would be the reality. Alternatively the code was just missing a "!" and wanted to only update mtu if "not aloready a value is set" ... no idea.

rzr commented 1 year ago

looking good but ... https://github.com/abandonware/noble/actions/runs/5650025982/job/15305587256#step:6:949

codecov-commenter commented 1 year ago

Codecov Report

Merging #308 (8c53570) into master (67dc6aa) will not change coverage. The diff coverage is 100.00%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff           @@
##           master     #308   +/-   ##
=======================================
  Coverage   91.79%   91.79%           
=======================================
  Files          24       24           
  Lines        2902     2902           
=======================================
  Hits         2664     2664           
  Misses        238      238           
Files Changed Coverage Δ
lib/noble.js 98.40% <100.00%> (ø)
Apollon77 commented 1 year ago

@rzr tests adjusted

Apollon77 commented 1 year ago

Ok, PR for release comes soon