mirror of
				https://github.com/meshtastic/firmware.git
				synced 2025-10-28 23:34:03 +00:00 
			
		
		
		
	fix NimBLEDevice::setPower for Nimble V1
This commit is contained in:
		
							parent
							
								
									e1b0c78884
								
							
						
					
					
						commit
						bbde9fc7c2
					
				| @ -1,11 +1,8 @@ | |||||||
| #include "configuration.h" | #include "configuration.h" | ||||||
| #if !MESHTASTIC_EXCLUDE_BLUETOOTH | #if !MESHTASTIC_EXCLUDE_BLUETOOTH | ||||||
| #include "BluetoothCommon.h" | #include "BluetoothCommon.h" | ||||||
| #include "NimBLEAdvertising.h" |  | ||||||
| #include "NimBLEExtAdvertising.h" |  | ||||||
| #include "NimbleBluetooth.h" | #include "NimbleBluetooth.h" | ||||||
| #include "PowerFSM.h" | #include "PowerFSM.h" | ||||||
| #include "PowerStatus.h" |  | ||||||
| 
 | 
 | ||||||
| #include "main.h" | #include "main.h" | ||||||
| #include "mesh/PhoneAPI.h" | #include "mesh/PhoneAPI.h" | ||||||
| @ -328,7 +325,11 @@ void NimbleBluetooth::setup() | |||||||
|     LOG_INFO("Init the NimBLE bluetooth module"); |     LOG_INFO("Init the NimBLE bluetooth module"); | ||||||
| 
 | 
 | ||||||
|     NimBLEDevice::init(getDeviceName()); |     NimBLEDevice::init(getDeviceName()); | ||||||
|  | #ifdef NIMBLE_TWO | ||||||
|     NimBLEDevice::setPower(9); |     NimBLEDevice::setPower(9); | ||||||
|  | #else | ||||||
|  |     NimBLEDevice::setPower(ESP_PWR_LVL_P9); | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
|     if (config.bluetooth.mode != meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN) { |     if (config.bluetooth.mode != meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN) { | ||||||
|         NimBLEDevice::setSecurityAuth(BLE_SM_PAIR_AUTHREQ_BOND | BLE_SM_PAIR_AUTHREQ_MITM | BLE_SM_PAIR_AUTHREQ_SC); |         NimBLEDevice::setSecurityAuth(BLE_SM_PAIR_AUTHREQ_BOND | BLE_SM_PAIR_AUTHREQ_MITM | BLE_SM_PAIR_AUTHREQ_SC); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Links2004
						Links2004