OpenVoiceOS / ovos-PHAL

Apache License 2.0
1 stars 4 forks source link

sj201 v6 and v10 division #32

Closed builderjer closed 3 months ago

builderjer commented 3 months ago

added sj201v10 detection.

This helps with plugin validation.

builderjer commented 3 months ago

Is this failing because it is from my personal repo? and not from ovos?

Regardless, I think this should be merged until we figure out where this code can go.

JarbasAl commented 3 months ago

i still think these should be defined in the individual plugins and this file deleted from here

only the mk2 plugins need to check for a mk2.... doesnt make sense to be in PHAL.

also plugins should only need to import from OPM, not from the PHAL code (this is true for all plugins and other services)

builderjer commented 3 months ago

I feel that it should be shared code somewhere in the ovos repos. OPM makes sense to me more than individual packages copying the same thing. This allows for multiple mk2 plug-ins to do an import, instead of duplicating code.

JarbasAl commented 3 months ago

1 line of code 'i2cdetect -y -a 1 0x04 0x04 | egrep "(04|UU)" | awk \'{print $2}\'' used in 2 repos at best (fan and leds) is really not worth packaging IMHO....

conceptually doesnt fit in OPM repos either, in the sense it is not a shared util for all plugins, same argument done for the led and fan stuff

perhaps a dedicated tiny library can be created, just to have the i2c checks available in a single place with 0 dependencies, making it useful also for non OVOS projects etc

builderjer commented 3 months ago

I can go for that for sure

builderjer commented 3 months ago

depreciated detection to move to its own repo https://github.com/OpenVoiceOS/ovos-i2c-detection