Skip to content

Commit 808d2b3

Browse files
authored
Merge pull request #639 from Mentra-Community/dev
Dev
2 parents 6789e4a + 0b093cc commit 808d2b3

File tree

6 files changed

+20
-14
lines changed

6 files changed

+20
-14
lines changed

augmentos_asg_client/app/src/main/java/com/augmentos/asg_client/bluetooth/K900BluetoothManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ public boolean sendData(byte[] data) {
126126
for (int i = 0; i < Math.min(data.length, 50); i++) {
127127
hexDump.append(String.format("%02X ", data[i]));
128128
}
129-
Log.e(TAG, "📦 AFTER C-WRAPPING & PROTOCOL FORMATTING (first 50 bytes): " + hexDump.toString());
130-
Log.e(TAG, "📦 Total formatted length: " + data.length + " bytes");
129+
//Log.e(TAG, "📦 AFTER C-WRAPPING & PROTOCOL FORMATTING (first 50 bytes): " + hexDump.toString());
130+
//Log.e(TAG, "📦 Total formatted length: " + data.length + " bytes");
131131
} else {
132132
// Otherwise just apply protocol formatting
133133
Log.e(TAG, "📦 Data already C-wrapped or not JSON: " + originalData);

augmentos_asg_client/app/src/main/java/com/augmentos/asg_client/bluetooth/utils/CircleBuffer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ public boolean add(byte[] buf, int offset, int len) {
7171
}
7272

7373
// Keep this circle buffer log
74-
Log.d(TAG, "Added " + len + " bytes to buffer, now contains " + getDataLen() + " bytes");
74+
//Log.d(TAG, "Added " + len + " bytes to buffer, now contains " + getDataLen() + " bytes");
7575
return true;
7676
} else {
77-
Log.w(TAG, "Cannot add " + len + " bytes to buffer");
77+
//Log.w(TAG, "Cannot add " + len + " bytes to buffer");
7878
return false;
7979
}
8080
}
@@ -158,7 +158,7 @@ public void removeHead(int size) {
158158
}
159159

160160
// Keep this circle buffer log
161-
Log.d(TAG, "Removed " + size + " bytes from buffer head, " + getDataLen() + " bytes remaining");
161+
//Log.d(TAG, "Removed " + size + " bytes from buffer head, " + getDataLen() + " bytes remaining");
162162
}
163163

164164
/**

augmentos_cloud/porter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
type: web
1616
run: node packages/cloud/dist/index.js
1717
port: 80
18-
cpuCores: 5
18+
cpuCores: 2.9
1919
ramMegabytes: 4096
2020
env:
2121
HOST: "0.0.0.0"

augmentos_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/hci/PhoneMicrophoneManager.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,12 @@ public void startPreferredMicMode() {
218218
return;
219219
}
220220

221+
// IGNORE REDUNDANT ENABLE CALLS - check if we're already in a working microphone state
222+
if (currentStatus != MicStatus.PAUSED) {
223+
Log.d(TAG, "Microphone already enabled (current status: " + currentStatus + ") - ignoring redundant enable request");
224+
return;
225+
}
226+
221227
// Smart debouncing logic
222228
long now = System.currentTimeMillis();
223229
long timeSinceLastChange = now - lastModeChangeTime;

augmentos_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/smartglassescommunicators/MentraLiveSGC.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic
590590
@Override
591591
public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
592592
if (status == BluetoothGatt.GATT_SUCCESS) {
593-
Log.d(TAG, "Characteristic write successful");
593+
//Log.d(TAG, "Characteristic write successful");
594594

595595
// Calculate time since last send to enforce rate limiting
596596
long currentTimeMs = System.currentTimeMillis();
@@ -600,7 +600,7 @@ public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristi
600600
if (timeSinceLastSendMs < MIN_SEND_DELAY_MS) {
601601
// Not enough time has elapsed, enforce minimum delay
602602
nextProcessDelayMs = MIN_SEND_DELAY_MS - timeSinceLastSendMs;
603-
Log.d(TAG, "Rate limiting: Next queue processing in " + nextProcessDelayMs + "ms");
603+
//Log.d(TAG, "Rate limiting: Next queue processing in " + nextProcessDelayMs + "ms");
604604
} else {
605605
// Enough time has already passed
606606
nextProcessDelayMs = 0;
@@ -1424,9 +1424,9 @@ private static String bytesToHex(byte[] bytes) {
14241424
*/
14251425
private void requestBatteryStatus() {
14261426
try {
1427-
JSONObject json = new JSONObject();
1428-
json.put("type", "request_battery_state");
1429-
sendDataToGlasses(json.toString());
1427+
//JSONObject json = new JSONObject();
1428+
//json.put("type", "request_battery_state");
1429+
//sendDataToGlasses(json.toString());
14301430

14311431
requestBatteryK900();
14321432
} catch (JSONException e) {

augmentos_core/app/src/main/java/com/augmentos/augmentos_core/smarterglassesmanager/utils/K900ProtocolUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public static byte[] packJsonToK900(String jsonData) {
159159
// First wrap with C-field
160160
JSONObject wrapper = new JSONObject();
161161
wrapper.put(FIELD_C, jsonData);
162-
wrapper.put("W", 1); // Add W field as seen in MentraLiveSGC
162+
//wrapper.put("W", 1); // Add W field as seen in MentraLiveSGC
163163

164164
// Convert to string
165165
String wrappedJson = wrapper.toString();
@@ -206,8 +206,8 @@ public static byte[] formatMessageForTransmission(String jsonData) {
206206
for (int i = 0; i < Math.min(result.length, 30); i++) {
207207
hexDump.append(String.format("%02X ", result[i]));
208208
}
209-
android.util.Log.e("K900ProtocolUtils", "🔄 After protocol formatting (first 30 bytes): " + hexDump);
210-
android.util.Log.e("K900ProtocolUtils", "🔄 Final length: " + result.length + " bytes");
209+
//android.util.Log.e("K900ProtocolUtils", "🔄 After protocol formatting (first 30 bytes): " + hexDump);
210+
//android.util.Log.e("K900ProtocolUtils", "🔄 Final length: " + result.length + " bytes");
211211

212212
return result;
213213

0 commit comments

Comments
 (0)