bug fixed in printKey()
This commit is contained in:
parent
fe925f19f8
commit
05e9843bd5
@ -10,10 +10,10 @@
|
|||||||
|
|
||||||
; ---> SELECT TARGET PLATFORM HERE! <---
|
; ---> SELECT TARGET PLATFORM HERE! <---
|
||||||
[platformio]
|
[platformio]
|
||||||
env_default = heltec_wifi_lora_32
|
;env_default = heltec_wifi_lora_32
|
||||||
;env_default = ttgov1
|
;env_default = ttgov1
|
||||||
;env_default = ttgov2
|
;env_default = ttgov2
|
||||||
;env_default = lopy
|
env_default = lopy
|
||||||
;env_default = lopy4
|
;env_default = lopy4
|
||||||
|
|
||||||
[env:heltec_wifi_lora_32]
|
[env:heltec_wifi_lora_32]
|
||||||
@ -91,8 +91,8 @@ lib_deps =
|
|||||||
ESP32 BLE Arduino@>=0.4.9
|
ESP32 BLE Arduino@>=0.4.9
|
||||||
build_flags =
|
build_flags =
|
||||||
;set log level, we need build_flag for this, otherwise we can't use ESP_LOGx in arduino framework
|
;set log level, we need build_flag for this, otherwise we can't use ESP_LOGx in arduino framework
|
||||||
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
|
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
|
||||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||||
;needed for ESP32 BLE Ardunio v0.4.9
|
;needed for ESP32 BLE Ardunio v0.4.9
|
||||||
-fexceptions
|
-fexceptions
|
||||||
-std=c++11
|
-std=c++11
|
||||||
|
@ -53,7 +53,7 @@ void printKey(const char * name, const uint8_t * key, uint8_t len, bool lsb) {
|
|||||||
uint8_t start=lsb?len:0;
|
uint8_t start=lsb?len:0;
|
||||||
uint8_t end = lsb?0:len;
|
uint8_t end = lsb?0:len;
|
||||||
const uint8_t * p ;
|
const uint8_t * p ;
|
||||||
char keystring[len+1] = "", keybyte[3];
|
char keystring[len+1] = "?", keybyte[3];
|
||||||
for (uint8_t i=0; i<len ; i++) {
|
for (uint8_t i=0; i<len ; i++) {
|
||||||
p = lsb ? key+len-i-1 : key+i;
|
p = lsb ? key+len-i-1 : key+i;
|
||||||
sprintf(keybyte, "%02X", * p);
|
sprintf(keybyte, "%02X", * p);
|
||||||
|
Loading…
Reference in New Issue
Block a user