0

considering: https://github.com/dmichel76/ViSi-Genie-RaspPi-Library

I've tried a serial read and a write, from raspbian to 4d panel, and it all worked fine.

I 'm trying to use a slider controller, this way it work for one minute then goes down returning -1 at read.

import geniePi as D
import wiringpi2 as W

W.wiringPiSetup()
D.genieSetup("/dev/ttyAMA0", 115200)

while 1:
    a = D.genieReadObj(32,0)
    print ("a:" % (a))

I'm looking at genieGetReply to solve this issue(to avoid the use of ReadObj):

But looking at swig files seems like genieReplyAvail is always considered as 0, am I right?

SWIGINTERN PyObject *_wrap_genieReplyAvail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int result;

So genieGetReply() isn't called. It appear that to use genieGetReply() I must create a class of the struct genieReplyStruct.

x =D.genieReplyStruct()
D.genieGetReply(x)

(if geniReplyAvail never get other value than 0 so this stay forever in the delay(1) statement)

I cannot understand how this should be implemented and called, so I kindly ask you a little advice.

dsolimano
  • 8,870
  • 3
  • 48
  • 63
user2239318
  • 2,578
  • 7
  • 28
  • 50

1 Answers1

0

I experienced exactly the same issue. I fixed it as follow: Did you check that you report a message from the Workshop software ? Select the button, go to the Events tab, and put "report Message" in "On Changed". Build/download and try again. It should work now. Hope it helps.

arnaud405
  • 1
  • 1
  • 2