Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/uhk-agent/src/services/device.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1420,12 +1420,13 @@ export class DeviceService {

private async readZephyrLog(): Promise<void> {
try {
const uhkDeviceProduct = await getCurrentUhkDeviceProduct(this.options);
const log = await this.operations.getVariable(UsbVariables.ShellBuffer)
this.logService.misc(`[DeviceService] Right half zephyr log: ${log}`);
const logEntry: ZephyrLogEntry = {
log: log as string,
level: 'info',
device: UHK_80_DEVICE.logName,
device: uhkDeviceProduct.logName,
}
this.win.webContents.send(IpcEvents.device.zephyrLog, logEntry)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h1 class="pane-title">
[disabled]="state.isLeftHalfPairing"
(click)="onToggleZephyrLogging()"
>
Zephyr logging
Logging
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we rename here the Zephyr logging then maybe worth to rename/remove the zephyr from the code blocks too. The ZephyrLogService covers the dongle and UHK80 Left Zephyr logging. Maybe worth to rename the Zephyr to Shell. What do you think?

</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ export class AdvancedSettingsPageComponent implements OnInit, OnDestroy {
this.connectedDeviceSubscription = this.store.select(getConnectedDevice)
.subscribe(connectedDevice => {
this.isHalvesPairingAllowed = connectedDevice?.id === UHK_80_DEVICE.id;
this.isZephyrLoggingAllowed = connectedDevice?.id === UHK_80_DEVICE.id;
this.isZephyrLoggingAllowed = connectedDevice?.id === UHK_80_DEVICE.id
|| connectedDevice?.id === UHK_60_DEVICE.id
|| connectedDevice?.id === UHK_60_V2_DEVICE.id;
Comment on lines +90 to +92
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't add other condition like firmware version then why not just allow logging when device is connected?

Suggested change
this.isZephyrLoggingAllowed = connectedDevice?.id === UHK_80_DEVICE.id
|| connectedDevice?.id === UHK_60_DEVICE.id
|| connectedDevice?.id === UHK_60_V2_DEVICE.id;
this.isZephyrLoggingAllowed = !!connectedDevice;

this.showI2CRecoverButton = connectedDevice?.id === UHK_60_DEVICE.id || connectedDevice?.id === UHK_60_V2_DEVICE.id;
this.cdRef.detectChanges();
});
Expand Down