mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 12:55:14 +03:00
add bluebirdjs promises, inject some helpful methods in array
This commit is contained in:
parent
46c36048bb
commit
3f8fd78027
3 changed files with 45 additions and 0 deletions
12
js/injected_methods.js
Normal file
12
js/injected_methods.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
Array.prototype.push8 = function(val) {
|
||||
this.push(0xFF & val);
|
||||
return this;
|
||||
};
|
||||
Array.prototype.push16 = function(val) {
|
||||
// low byte
|
||||
this.push(0x00FF & val);
|
||||
// high byte
|
||||
this.push(val >> 8);
|
||||
// chainable
|
||||
return this;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue