Re: [casetta] It **almost** works (sending matrices) !

[ Thread Index | Date Index | More lists.tuxfamily.org/casetta Archives ]


Hello,

Fabien ANDRE a écrit :
Hello,

Last mail ! I promise. You can actually send matrices (if you accept the receive error from the calc) : It works but there are errors :-) hum hum hum. :-).
It *almost *works and it is *almost *bugfree !

You have to manually set the dimensions of the matrix (see examples in attachments).

I've tried yours contribution, it's very interesting, and seems to work almost good. I will not add it in the 0.3 version: I prefer to release the 0.3 version before doing the work on file formats about matrices, lists and variables, and if only the transfer tool manage lists, matrices and variables, it's not very useful. But yours contributions will help a lot for the 0.4 development.

(I've attached the remotectrl-casetta modified to work with Amarok, with the same casio program.)
Just about the english (yes I am a maniac of spelling mistakes) :
fr : un calcul (en maths) -> en : a calculation
fr : une légende, pour une carte, un schéma -> en : a caption (That's for the feature matrix).
If I made some mistakes, I'm of course OK to fix them, but where are they?

Cheers,

--
Thesa ~ Florian Birée
e-mail : florian.biree@xxxxxxxxxxx
Messagerie Instantanée Jabber/XMPP/Google Talk : florian.biree@xxxxxxxxx
Site web et blog : http://filyb.info/

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import casetta
connect=casetta.devices_serial.Connexion()
touche=0
while touche != 47:
    while not connect.calc_is_ready_to_send():
        pass 
    #num2=hex(ord(data[5])).replace('0x','')
    #num1=hex(ord(data[4])).replace('0x','')
    #touche=int(num1)*10+int(num2)/10
    var=connect.receive_data()
    touche=int(var.get_val())
    print touche
    if touche==79:
        os.popen('dcop amarok player playPause')
    elif touche==69:
        os.popen('dcop amarok player stop')
    elif touche==28:
        os.popen('dcop amarok player volumeUp')
    elif touche==37:
        os.popen('dcop amarok player volumeDown')
    elif touche==38:
        os.popen('dcop amarok player prev')
    elif touche==27:
        os.popen('dcop amarok player next')
#    elif touche==68:
#        os.popen('xmms --toggle-repeat') 



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/