mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
Tici hardware abstraction layer (#2183)
* rename android hardware * add tici class * elif * read correct serial number * Update release files * Get IMEI * Refactor AT command * move get_cmdline into base class * Remove unused import * Small cleanup old-commit-hash: c90cb1b529c24580f8351c046f2b5b022a956ba8
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
from abc import abstractmethod
|
||||
|
||||
|
||||
class HardwareBase:
|
||||
@staticmethod
|
||||
def get_cmdline():
|
||||
with open('/proc/cmdline') as f:
|
||||
cmdline = f.read()
|
||||
return {kv[0]: kv[1] for kv in [s.split('=') for s in cmdline.split(' ')] if len(kv) == 2}
|
||||
|
||||
@abstractmethod
|
||||
def get_sound_card_online(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user