Parcourir la source

Use rpi-issue to determine if running on a Raspberry Pi

mendhak il y a 2 ans
Parent
commit
c097e98d5a
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      RaspberryPi_JetsonNano/python/lib/waveshare_epd/epdconfig.py

+ 1 - 1
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epdconfig.py

@@ -230,7 +230,7 @@ class SunriseX3:
         self.GPIO.cleanup([self.RST_PIN, self.DC_PIN, self.CS_PIN, self.BUSY_PIN], self.PWR_PIN)
 
 
-if os.path.exists('/sys/bus/platform/drivers/gpiomem-bcm2835'):
+if os.path.exists('/etc/rpi-issue'):
     implementation = RaspberryPi()
 elif os.path.exists('/sys/bus/platform/drivers/gpio-x3'):
     implementation = SunriseX3()