paul- wrote:
> I've not tested with 2 buttons, can you show be a trace with 2 buttons,
> and long an short presses of each button.
Here's an example where I defined two buttons:
- GPIO 22 short press = MIX- (defined as ["mixer","volume","-5"])
- GPIO 22 long press = MUTE (defined as ["mixer","volume","0"])
- GPIO 25 short press = MIX+ (defined as ["mixer","volume","+5"])
- GPIO 25 long press = VMAX (defined as ["mixer","volume","100"])
A press of either button seems to be recognised as GPIO 22, so only MIX-
and MUTE are ever sent. Short and long presses are properly detected
however. In previous testing with this version it's always been the
first button defined in the command string that gets recognised by any
button press.
I'll capture some -z output as well, in case that sheds any more light
on this.
Code:
--------------------
sudo /home/tc/sbpd-pigpio -v -M dc:a6:32:03:82:22 -f
/home/tc/sbpd_commands.cfg b,22,MIX-,2,0,MUTE,500 b,25,MIX+,2,0,VMAX,500
1566404257.5381 6 sbpd.c,284: Options parsing: Set verbose mode
1566404257.5382 6 sbpd.c,309: Options parsing: Manually set MAC:
dc:a6:32:03:82:22
1566404257.5382 6 sbpd.c,343: Options parsing: Setting command config file to
/home/tc/sbpd_commands.cfg
1566404257.5383 6 sbpd.c,505: name=MIX+, value=["mixer","volume","+5"]
1566404257.5384 6 control.c,81: Adding Command MIX+: Fragment
["mixer","volume","+5"]
1566404257.5385 6 sbpd.c,505: name=MIX-, value=["mixer","volume","-5"]
1566404257.5385 6 control.c,81: Adding Command MIX-: Fragment
["mixer","volume","-5"]
1566404257.5385 6 sbpd.c,505: name=VMAX, value=["mixer","volume","100"]
1566404257.5386 6 control.c,81: Adding Command VMAX: Fragment
["mixer","volume","100"]
1566404257.5387 6 sbpd.c,505: name=MUTE, value=["mixer","volume","0"]
1566404257.5387 6 control.c,81: Adding Command MUTE: Fragment
["mixer","volume","0"]
1566404257.5388 6 GPIO.c,261: Initializing GPIO
1566404257.7160 6 control.c,204: Button defined: Pin 22, BCM Resistor: up,
Short Type: LMS, Short Fragment: ["mixer","volume","-5"] , Long Type: LMS, Long
Fragment: ["mixer","volume","0"], Long Press Time: 500
1566404257.7161 6 control.c,204: Button defined: Pin 25, BCM Resistor: up,
Short Type: LMS, Short Fragment: ["mixer","volume","+5"] , Long Type: LMS, Long
Fragment: ["mixer","volume","100"], Long Press Time: 500
1566404257.7161 6 servercomm.c,176: Initializing CURL
1566404257.7237 6 sbpd.c,237: Starting main loop polling
1566404257.7240 6 discovery.c,234: Found server 0401A8C0. A new address
1566404257.8243 6 discovery.c,345: discovery packet: port: 9000, name:
pCPLoungePi4, uuid: f8c593d1-583d-4750-b7c5-7a6944c8bf18
1566404257.8243 6 discovery.c,130: Squeezebox control port found: 9000
1566404257.8244 6 discovery.c,149: Server address found: 192.168.1.4
1566404300.0743 6 GPIO.c,107: Short PRESS: 191
1566404300.0743 6 control.c,107: Button CB set for button #:0, gpio pin 22
1566404300.0876 6 control.c,218: Button pressed: Pin: 22, Press Type:Short
1566404300.0877 6 servercomm.c,74: Send Command:0,
Fragment:["mixer","volume","-5"]
1566404302.6376 6 GPIO.c,107: Short PRESS: 176
1566404302.6377 6 control.c,107: Button CB set for button #:0, gpio pin 22
1566404302.6944 6 control.c,218: Button pressed: Pin: 22, Press Type:Short
1566404302.6945 6 servercomm.c,74: Send Command:0,
Fragment:["mixer","volume","-5"]
1566404304.6224 6 GPIO.c,107: Short PRESS: 155
1566404304.6225 6 control.c,107: Button CB set for button #:0, gpio pin 22
1566404304.6995 6 control.c,218: Button pressed: Pin: 22, Press Type:Short
1566404304.6996 6 servercomm.c,74: Send Command:0,
Fragment:["mixer","volume","-5"]
1566404306.0980 6 GPIO.c,107: Short PRESS: 178
1566404306.0981 6 control.c,107: Button CB set for button #:0, gpio pin 22
1566404306.1126 6 control.c,218: Button pressed: Pin: 22, Press Type:Short
1566404306.1127 6 servercomm.c,74: Send Command:0,
Fragment:["mixer","volume","-5"]
1566404309.3530 6 GPIO.c,102: Long PRESS: 1367
1566404309.3530 6 control.c,107: Button CB set for button #:0, gpio pin 22
1566404309.4188 6 control.c,218: Button pressed: Pin: 22, Press Type:Long
1566404309.4189 6 servercomm.c,74: Send Command:0,
Fragment:["mixer","volume","0"]
1566404314.8328 6 GPIO.c,102: Long PRESS: 1628
1566404314.8328 6 control.c,107: Button CB set for button #:0, gpio pin 22
1566404314.9268 6 control.c,218: Button pressed: Pin: 22, Press Type:Long
1566404314.9268 6 servercomm.c,74: Send Command:0,
Fragment:["mixer","volume","0"]
1566404319.7263 6 GPIO.c,102: Long PRESS: 1142
1566404319.7263 6 control.c,107: Button CB set for button #:0, gpio pin 22
1566404319.7336 6 control.c,218: Button pressed: Pin: 22, Press Type:Long
1566404319.7336 6 servercomm.c,74: Send Command:0,
Fragment:["mixer","volume","0"]
1566404321.7697 6 GPIO.c,102: Long PRESS: 1048
1566404321.7698 6 control.c,107: Button CB set for button #:0, gpio pin 22
1566404321.8385 6 control.c,218: Button pressed: Pin: 22, Press Type:Long
1566404321.8386 6 servercomm.c,74: Send Command:0,
Fragment:["mixer","volume","0"]
1566404325.2238 6 GPIO.c,107: Short PRESS: 100
1566404325.2238 6 control.c,107: Button CB set for button #:0, gpio pin 22
1566404325.2445 6 control.c,218: Button pressed: Pin: 22, Press Type:Short
1566404325.2445 6 servercomm.c,74: Send Command:0,
Fragment:["mixer","volume","-5"]
1566404326.2440 6 GPIO.c,107: Short PRESS: 105
1566404326.2441 6 control.c,107: Button CB set for button #:0, gpio pin 22
1566404326.2485 6 control.c,218: Button pressed: Pin: 22, Press Type:Short
1566404326.2485 6 servercomm.c,74: Send Command:0,
Fragment:["mixer","volume","-5"]
--------------------
------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=107001
_______________________________________________
diy mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/diy