Fix: add remaining BatteryInfo fields, fix TextWord cast in OcrAdapter

This commit is contained in:
Eiloud 2026-05-13 17:53:07 +08:00
parent 9e3c1a1486
commit 7dda953045
2 changed files with 4 additions and 1 deletions

View File

@ -64,7 +64,7 @@ export class OcrAdapter extends BaseAdapter {
for (const block of data.blocks) { for (const block of data.blocks) {
for (const line of block.lines) { for (const line of block.lines) {
for (let word of line.words) { for (let word of line.words) {
let word1: TextWord = word; let word1: TextWord = { word: (word as any).text || '' };
wordsArray.push(word1); wordsArray.push(word1);
} }
} }

View File

@ -335,6 +335,9 @@ export interface BatteryInfo {
batterySOC: number; batterySOC: number;
chargingStatus: number; chargingStatus: number;
isBatteryPresent: boolean; isBatteryPresent: boolean;
estimatedRemainingChargeTime: number;
nowCurrent: number;
remainingEnergy: number;
} }
export interface OcrAdapterImage { export interface OcrAdapterImage {