News:

Latest versions:
Server plugin: 0.5.1
MVP dongle: 0.5.2
Raspberry Pi client: 0.5.2
Windows client: 0.5.2-1

Main Menu

CEC - Channel Up/Down on same button as skip Left/right

Started by sirwio, September 16, 2012, 20:35:19

Previous topic - Next topic

sirwio

On my Philips TV remote the buttons Channel Up/Down and Skip Left/Right are on the same place on the remote.

While watching recordings we usually skip forward using the Skip Right button to skip the commercials :-). This does however not work on the raspi vompclient with my philips remote.

Could it be that the vompclient need to announce itself as being in different modes depending on where in the UI one are navigating. E.g while watching live tv its obvious that a press on the buttons mentioned above shall result in a Channel Up/Down message whilst in recordings and perhaps elsewhere in the menus one shall receive Skip Left/Right messages.

Sorry if this is totally of bound on how CEC and libcec is supposed to work but I'm a total noob in this area.

Another problem with the remote is that there is no "Record" button making it impossible to set a show from the program guide to be recorded. Any suggested workaround for this?


MartenR

QuoteOn my Philips TV remote the buttons Channel Up/Down and Skip Left/Right are on the same place on the remote.
Actually there are modes.
Can you please look on the CEC messages in the log "vompclient -d>debug.log" to figure out as which keys code they arrive.

Then please go to the line
cec_config.deviceTypes.Add(CEC_DEVICE_TYPE_TUNER);
and change it to
cec_config.deviceTypes.Add(CEC_DEVICE_TYPE_PLAYBACK_DEVICE);
and look into the logs if the key code change and then try
cec_config.deviceTypes.Add(CEC_DEVICE_TYPE_RECORDING_DEVICE);,
if it really makes a difference, I have think about a clean solution to handle this,
you now that also the color keys can be used for some skipping. (but not to the marks).
For the record button you may map another key to the record key function.

Marten



sirwio

Thanks for the pointers. Have for the last hour read the libcec api headers and might write a small test application to see whether its possible to switch between device types on the fly. It appears so.

But first I will follows your suggestion to actually check if the device type does change the command sent to the device.

sirwio

Did a quick test changing the device type between CEC_DEVICE_TYPE_TUNER, CEC_DEVICE_TYPE_PLAYBACK_DEVICE and CEC_DEVICE_TYPE_RECORDING_DEVICE. It did not have any impact on the message sent when pressing the Channel Up button.

MartenR

Ok, than I have an idea, we can let the raspberry behave like an old remote.
Thus using DF_UP and DF_DOWN.
So please test the following replace in vvideolive the case for Remote::UP with the case for Remote::DF_UP and the same for down.
If this works ok, I will add a c++ macro which switches this behaviour for different targets.

Marten

MartenR

I will commit within the next minutes a changes, that should at least make the channel up and down problem go away, by also using up and down arrows for channel up and down. For the record button, I have no solution in the moment, accept of assigning another key to it.

Marten