Fix: add remaining BatteryInfo fields, fix TextWord cast in OcrAdapter
This commit is contained in:
parent
9e3c1a1486
commit
7dda953045
@ -64,7 +64,7 @@ export class OcrAdapter extends BaseAdapter {
|
||||
for (const block of data.blocks) {
|
||||
for (const line of block.lines) {
|
||||
for (let word of line.words) {
|
||||
let word1: TextWord = word;
|
||||
let word1: TextWord = { word: (word as any).text || '' };
|
||||
wordsArray.push(word1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -335,6 +335,9 @@ export interface BatteryInfo {
|
||||
batterySOC: number;
|
||||
chargingStatus: number;
|
||||
isBatteryPresent: boolean;
|
||||
estimatedRemainingChargeTime: number;
|
||||
nowCurrent: number;
|
||||
remainingEnergy: number;
|
||||
}
|
||||
|
||||
export interface OcrAdapterImage {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user