From 18a091d48ea4473320cc5485edd613db8e9b19d0 Mon Sep 17 00:00:00 2001 From: builderjer <34875857+builderjer@users.noreply.github.com> Date: Sun, 2 Jun 2024 06:27:02 -0600 Subject: [PATCH] sj201 v6 and v10 division (#32) * sj201 v6 and v10 division added sj201v10 detection. This helps with plugin validation. * deprecated is_mycroft_sj201 * depreciated detection --- ovos_PHAL/detection.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ovos_PHAL/detection.py b/ovos_PHAL/detection.py index b38ebf3..b8e326e 100644 --- a/ovos_PHAL/detection.py +++ b/ovos_PHAL/detection.py @@ -1,6 +1,8 @@ import subprocess +from ovos_utils.log import deprecated +@deprecated("Use from ovos-i2c-detection import is_sj201_v6", "0.2.0") def is_mycroft_sj201(): cmd = 'i2cdetect -y -a 1 0x04 0x04 | egrep "(04|UU)" | awk \'{print $2}\'' out = subprocess.check_output(cmd, shell=True).strip() @@ -9,6 +11,7 @@ def is_mycroft_sj201(): return False +@deprecated("Use from ovos-i2c-detection import is_wm8960", "0.2.0") def is_respeaker_2mic(): cmd = 'i2cdetect -y -a 1 0x1a 0x1a | egrep "(1a|UU)" | awk \'{print $2}\'' out = subprocess.check_output(cmd, shell=True).strip() @@ -17,6 +20,7 @@ def is_respeaker_2mic(): return False +@deprecated("Use from ovos-i2c-detection import is_respeaker_4mic", "0.2.0") def is_respeaker_4mic(): cmd = 'i2cdetect -y -a 0x35 0x35 | egrep "(35|UU)" | awk \'{print $2}\'' out = subprocess.check_output(cmd, shell=True).strip() @@ -25,6 +29,7 @@ def is_respeaker_4mic(): return False +@deprecated("Use from ovos-i2c-detection import is_respeaker_6mic", "0.2.0") def is_respeaker_6mic(): cmd = 'i2cdetect -y -a 0x3b 0x3b | egrep "(3b|UU)" | awk \'{print $2}\'' out = subprocess.check_output(cmd, shell=True).strip() @@ -33,6 +38,7 @@ def is_respeaker_6mic(): return False +@deprecated("Use from ovos-i2c-detection import is_adafruit_amp", "0.2.0") def is_adafruit(): cmd = 'i2cdetect -y -a 0x4b 0x4b | egrep "(4b|UU)" | awk \'{print $2}\'' out = subprocess.check_output(cmd, shell=True).strip() @@ -41,6 +47,7 @@ def is_adafruit(): return False +@deprecated("Use from ovos-i2c-detection import is_tas5806", "0.2.0") def is_texas_tas5806(): cmd = 'i2cdetect -y -a 0x2f 0x2f | egrep "(2f|UU)" | awk \'{print $2}\'' out = subprocess.check_output(cmd, shell=True).strip()