Skip to content

Instantly share code, notes, and snippets.

@oflarcade
Created October 30, 2019 09:09
Show Gist options
  • Save oflarcade/9ac0667a9ee45d8c82f60d10467afa9e to your computer and use it in GitHub Desktop.
Save oflarcade/9ac0667a9ee45d8c82f60d10467afa9e to your computer and use it in GitHub Desktop.
constructor() {
super();
this.state = {
scanning: false,
peripherals: new Map(),
peripheral:null,
appState: '',
connectedTo: 'nothing',
battery: null,
fVersion: null,
Snumber: null,
time: null,
steps: null,
distance: null,
calory: null,
rssi: null,
heartbeat: null,
};
this.handleDiscoverPeripheral = this.handleDiscoverPeripheral.bind(this);
this.handleStopScan = this.handleStopScan.bind(this);
this.handleUpdateValueForCharacteristic = this.handleUpdateValueForCharacteristic.bind(
this,
);
this.handleDisconnectedPeripheral = this.handleDisconnectedPeripheral.bind(
this,
);
this.handleAppStateChange = this.handleAppStateChange.bind(this);
}constructor() {
super();
this.state = {
scanning: false,
peripherals: new Map(),
peripheral:null,
appState: '',
connectedTo: 'nothing',
battery: null,
fVersion: null,
Snumber: null,
time: null,
steps: null,
distance: null,
calory: null,
rssi: null,
heartbeat: null,
};
this.handleDiscoverPeripheral = this.handleDiscoverPeripheral.bind(this);
this.handleStopScan = this.handleStopScan.bind(this);
this.handleUpdateValueForCharacteristic = this.handleUpdateValueForCharacteristic.bind(
this,
);
this.handleDisconnectedPeripheral = this.handleDisconnectedPeripheral.bind(
this,
);
this.handleAppStateChange = this.handleAppStateChange.bind(this);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment