mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 12:55:14 +03:00
Cleanup crunch(), switch to use .pushX functions
This commit is contained in:
parent
6275b8b462
commit
44a0d54ea9
4 changed files with 172 additions and 272 deletions
|
@ -10,6 +10,13 @@ Array.prototype.push16 = function(val) {
|
|||
// chainable
|
||||
return this;
|
||||
};
|
||||
Array.prototype.push32 = function(val) {
|
||||
this.push8(val)
|
||||
.push8(val >> 8)
|
||||
.push8(val >> 16)
|
||||
.push8(val >> 24);
|
||||
return this;
|
||||
}
|
||||
DataView.prototype.offset = 0;
|
||||
DataView.prototype.readU8 = function() {
|
||||
if (this.byteLength >= this.offset+1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue