You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is obvious that we can determine the Raspi board revision remotely by
looking at the number at position 3 in Mapping[1] or Mapping[2] when requesting
this by /webiopi/map. However, the map answer is a longer string requiring some
pattern-matching so determine stable and robust if the number at position 3 is
a 0 or a 2.
It would be much more simple by adding this code to the doGet() method in
webiopi.py:
# revision
elif relativePath == "revision":
self.send_response(200)
self.send_header("Content-type", "text/plain")
self.end_headers()
revision = "%s" % GPIO.BOARD_REVISION
self.wfile.write(revision.encode())
The HTTP answer would just be a plain "1" or "2" (assuming that cpuinfo.c does
its job correct) which is much more straight to use.
Original issue reported on code.google.com by andreas....@googlemail.com on 20 Dec 2012 at 8:28
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
andreas....@googlemail.com
on 20 Dec 2012 at 8:28The text was updated successfully, but these errors were encountered: