Canon BLE two-Arduino rewrite WIP
This commit is contained in:
parent
c0d6cbccec
commit
0b71da8e7b
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "CanonBLERemote.h"
|
#include "CanonBLERemote.h"
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "McopySerial.h"
|
//#include "McopySerial.h"
|
||||||
|
|
||||||
#define LOG_LOCAL_LEVEL ESP_LOG_INFO
|
#define LOG_LOCAL_LEVEL ESP_LOG_INFO
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
|
|
@ -18,7 +18,7 @@ fi
|
||||||
|
|
||||||
SKETCHES=(
|
SKETCHES=(
|
||||||
mcopy_arri_s_firmware
|
mcopy_arri_s_firmware
|
||||||
mcopy_cam_canon_ble
|
mcopy_cam_canon_ble_nano
|
||||||
mcopy_cam_relay
|
mcopy_cam_relay
|
||||||
mcopy_JKMM100
|
mcopy_JKMM100
|
||||||
components/mcopy_light
|
components/mcopy_light
|
||||||
|
|
|
@ -101,7 +101,7 @@ class Arduino {
|
||||||
**/
|
**/
|
||||||
async sendAsync (device : string, cmd : string) {
|
async sendAsync (device : string, cmd : string) {
|
||||||
return new Promise ((resolve, reject) => {
|
return new Promise ((resolve, reject) => {
|
||||||
console.log(`${device} -> ${cmd}`)
|
//this.log.info(`${device} -> ${cmd}`)
|
||||||
this.queue[cmd] = (ms : number) => {
|
this.queue[cmd] = (ms : number) => {
|
||||||
return resolve(ms)
|
return resolve(ms)
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ class Arduino {
|
||||||
}
|
}
|
||||||
}.bind(this), 1000)
|
}.bind(this), 1000)
|
||||||
}
|
}
|
||||||
console.log(`${device} -> ${cmd}`)
|
//this.log.info(`${device} -> ${cmd}`)
|
||||||
return this.serial[device].write(cmd, (err : any, results : any) => {
|
return this.serial[device].write(cmd, (err : any, results : any) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
//this.log.error(err)
|
//this.log.error(err)
|
||||||
|
|
Loading…
Reference in New Issue