Skip to content

Commit cdf7d88

Browse files
pushing cleaned up code for release testing
1 parent 88fb223 commit cdf7d88

File tree

17 files changed

+85
-851
lines changed

17 files changed

+85
-851
lines changed

Firmware/main/BLE.cpp renamed to Arduino Sketch/main/BLE.cpp

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,14 @@
55

66
#include "BLE.h"
77

8-
#define SERVICE_UUID_INFINITEPYRAMID "e804b643-6ce7-4e81-9f8a-ce0f699085eb"
9-
#define CHARACTERISTIC_UUID_IP_ID "e804b644-6ce7-4e81-9f8a-ce0f699085eb"
8+
#define SERVICE_UUID_ESPOTA "e804b643-6ce7-4e81-9f8a-ce0f699085eb"
9+
#define CHARACTERISTIC_UUID_ID "e804b644-6ce7-4e81-9f8a-ce0f699085eb"
1010

1111
#define SERVICE_UUID_OTA "b8659210-af91-4ad3-a995-a58d6fd26145" // UART service UUID
1212
#define CHARACTERISTIC_UUID_FW "b8659211-af91-4ad3-a995-a58d6fd26145"
1313
#define CHARACTERISTIC_UUID_HW_VERSION "b8659212-af91-4ad3-a995-a58d6fd26145"
1414
#define CHARACTERISTIC_UUID_READY "b8659213-af91-4ad3-a995-a58d6fd26145"
1515

16-
#define SOFTWARE_VERSION_MAJOR 0
17-
#define SOFTWARE_VERSION_MINOR 1
18-
#define SOFTWARE_VERSION_PATCH 0
19-
#define HARDWARE_VERSION_MAJOR 1
20-
#define HARDWARE_VERSION_MINOR 3
21-
2216
#define FULL_PACKET 512
2317
#define CHARPOS_UPDATE_FLAG 5
2418

@@ -86,12 +80,12 @@ bool BLE::begin(const char* localName = "UART Service") {
8680
pServer->setCallbacks(new BLECustomServerCallbacks());
8781

8882
// Create the BLE Service
89-
pInfinitePyramidService = pServer->createService(SERVICE_UUID_INFINITEPYRAMID);
83+
pESPOTAService = pServer->createService(SERVICE_UUID_ESPOTA);
9084
pService = pServer->createService(SERVICE_UUID_OTA);
9185

9286
// Create a BLE Characteristic
93-
pInfinitePyramidIdCharacteristic = pInfinitePyramidService->createCharacteristic(
94-
CHARACTERISTIC_UUID_IP_ID,
87+
pESPOTAIdCharacteristic = pESPOTAService->createCharacteristic(
88+
CHARACTERISTIC_UUID_ID,
9589
BLECharacteristic::PROPERTY_READ
9690
);
9791

@@ -109,11 +103,11 @@ bool BLE::begin(const char* localName = "UART Service") {
109103
pOtaCharacteristic->setCallbacks(new otaCallback(this));
110104

111105
// Start the service(s)
112-
pInfinitePyramidService->start();
106+
pESPOTAService->start();
113107
pService->start();
114108

115109
// Start advertising
116-
pServer->getAdvertising()->addServiceUUID(SERVICE_UUID_INFINITEPYRAMID);
110+
pServer->getAdvertising()->addServiceUUID(SERVICE_UUID_ESPOTA);
117111
pServer->getAdvertising()->start();
118112

119113
uint8_t hardwareVersion[5] = {HARDWARE_VERSION_MAJOR, HARDWARE_VERSION_MINOR, SOFTWARE_VERSION_MAJOR, SOFTWARE_VERSION_MINOR, SOFTWARE_VERSION_PATCH};

Firmware/main/BLE.h renamed to Arduino Sketch/main/BLE.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020

2121
#include "esp_ota_ops.h"
2222

23+
#define SOFTWARE_VERSION_MAJOR 0
24+
#define SOFTWARE_VERSION_MINOR 1
25+
#define SOFTWARE_VERSION_PATCH 0
26+
#define HARDWARE_VERSION_MAJOR 1
27+
#define HARDWARE_VERSION_MINOR 3
2328

2429
class BLE; // forward declaration
2530

@@ -59,8 +64,8 @@ class BLE
5964

6065
BLEServer *pServer = NULL;
6166

62-
BLEService *pInfinitePyramidService = NULL;
63-
BLECharacteristic * pInfinitePyramidIdCharacteristic = NULL;
67+
BLEService *pESPOTAService = NULL;
68+
BLECharacteristic * pESPOTAIdCharacteristic = NULL;
6469

6570
BLEService *pService = NULL;
6671
BLECharacteristic * pVersionCharacteristic = NULL;

Arduino Sketch/main/main.ino

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include "BLE.h"
2+
/**Bluetooth**/
3+
BLE BT;
4+
5+
void setup(void) {
6+
Serial.begin(115200);
7+
Serial.println("Serial Begin");
8+
Serial.println();
9+
10+
Serial.print("HW v");
11+
Serial.print(HARDWARE_VERSION_MAJOR);
12+
Serial.print(".");
13+
Serial.println(HARDWARE_VERSION_MINOR);
14+
15+
Serial.print("SW v");
16+
Serial.print(SOFTWARE_VERSION_MAJOR);
17+
Serial.print(".");
18+
Serial.print(SOFTWARE_VERSION_MINOR);
19+
Serial.print(".");
20+
Serial.println(SOFTWARE_VERSION_PATCH);
21+
22+
BT.begin("ESP32 OTA Updates");
23+
}
24+
25+
void loop(void) {
26+
27+
}

Firmware/main/AudioDriver.ino

Lines changed: 0 additions & 76 deletions
This file was deleted.

Firmware/main/battery.cpp

Lines changed: 0 additions & 1 deletion
This file was deleted.

Firmware/main/battery.h

Lines changed: 0 additions & 44 deletions
This file was deleted.

Firmware/main/buttons.ino

Lines changed: 0 additions & 85 deletions
This file was deleted.

Firmware/main/compiled/test.bin

-208 KB
Binary file not shown.

Firmware/main/compiled/v1_3.bin

-972 KB
Binary file not shown.

0 commit comments

Comments
 (0)