Changeset 4393


Ignore:
Timestamp:
Apr 21, 2017, 2:32:09 PM (3 years ago)
Author:
hectorgh
Message:

fixing udev rule

Location:
robolliurex/trunk/fuentes
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • robolliurex/trunk/fuentes/debian/changelog

    r4028 r4393  
     1robolliurex (1.2.1) xenial; urgency=medium
     2
     3  * Added proper udev rules to fix device permissions
     4
     5 -- Enrique Medina Gremaldos <quiqueiii@gmail.com>  Fri, 21 Apr 2017 13:50:44 +0200
     6
     7robolliurex (1.2.0) xenial; urgency=medium
     8
     9  * Using first available legousbtower[n] device found. Need a patched nqc for that.
     10
     11 -- Enrique Medina Gremaldos <quiqueiii@gmail.com>  Fri, 07 Apr 2017 14:55:20 +0200
     12
    113robolliurex (1.1.5) xenial; urgency=medium
    214
  • robolliurex/trunk/fuentes/rsrc/10-robolliurex.rules

    r89 r4393  
    1 #Añadido por Robolinex
    2 KERNEL=="legousbtower0", MODE="0666", SYMLINK+="usb/lego0"
    3 #fin añadido por RoboLinex
     1#Robolliurex lego rcx usb tower
     2KERNEL=="legousbtower[0-9]*", MODE="0666"
     3
  • robolliurex/trunk/fuentes/rsrc/CMakeLists.txt

    r4028 r4393  
    1818install(FILES ${CMAKE_SOURCE_DIR}/rsrc/icon.robolliurex.svg DESTINATION share/icons/hicolor/scalable/apps/ RENAME robolliurex.svg)
    1919install(FILES ${CMAKE_SOURCE_DIR}/rsrc/robolliurex.desktop DESTINATION share/applications/)
    20 install(FILES ${CMAKE_SOURCE_DIR}/rsrc/10-robolliurex.rules DESTINATION /lib/udeb/rules.d/)
     20install(FILES ${CMAKE_SOURCE_DIR}/rsrc/10-robolliurex.rules DESTINATION /lib/udev/rules.d/)
    2121install(FILES ${CMAKE_SOURCE_DIR}/rsrc/FIRM0309.lgo DESTINATION /lib/firmware/rcx/)
    2222install(FILES ${CMAKE_SOURCE_DIR}/rsrc/FIRM0328.lgo DESTINATION /lib/firmware/rcx/)
    23 install(FILES ${CMAKE_SOURCE_DIR}/rsrc/fast0612.lgo DESTINATION /lib/firmware/rcx/)
  • robolliurex/trunk/fuentes/src/robocore.cpp

    r89 r4393  
    77
    88#include <lsf-1.0/system.hpp>
     9#include <lsf-1.0/filesystem.hpp>
    910#include <gtk/gtk.h>
    1011
     
    8384
    8485RoboCore * RoboCore::singleton = nullptr;
    85 const char * RoboCore::comm_name[]={"/dev/ttyS0","/dev/ttyS1","usb"};
     86string RoboCore::comm_name[]={"/dev/ttyS0","/dev/ttyS1","usb"};
    8687
    8788RoboCore::RoboCore() : Application("net.lliurex.robolliurex")
     
    133134                cout<<"* Found Lego USB tower"<<endl;
    134135                comm_port = RBC_PORT_USB;
     136               
     137                vector<string> towers = filesystem::List("/dev/usb/legousbtower*");
     138               
     139                if(towers.size()==0)
     140                {
     141                        cout<<"* Warning, Lego driver is loaded but something failed!"<<endl;
     142                }
     143                else
     144                {
     145                        string usbp="usb:"+towers[0];
     146                        RoboCore::comm_name[comm_port]=usbp;
     147                        cout<<"Using tower device: "<<towers[0]<<endl;
     148                }
    135149               
    136150        }
     
    215229               
    216230        string cmd = string("nqc -S") + RoboCore::comm_name[RoboCore::GetCore()->comm_port] + " -firmware " + FIRM_PATH;
    217        
     231        cout<<cmd<<endl;
    218232        fp = popen( cmd.c_str(),"r" );
    219233       
     
    283297       
    284298        string cmd = string("nqc -S") + RoboCore::comm_name[RoboCore::GetCore()->comm_port] + " -raw 10";
    285        
     299        cout<<cmd<<endl;
    286300        fp = popen( cmd.c_str(),"r" );
    287301       
  • robolliurex/trunk/fuentes/src/robocore.h

    r4028 r4393  
    1313
    1414#ifdef LOCAL
    15         #define FIRM_PATH "../rsrc/fast0612.lgo"
     15        #define FIRM_PATH "../rsrc/FIRM0328.lgo"
    1616#else
    17         #define FIRM_PATH "/lib/firmware/rcx/fast0612.lgo"
     17        #define FIRM_PATH "/lib/firmware/rcx/FIRM0328.lgo"
    1818#endif
    1919
     
    7777                               
    7878                                public:
    79                                         static const char * comm_name[];
     79                                        static std::string comm_name[];
    8080                                        int comm_port;
    8181                                        bool usb_tower;
  • robolliurex/trunk/fuentes/src/robolliurex.h

    r4028 r4393  
    88
    99
    10 #define VERSION "1.1.5"
     10#define VERSION "1.2.1"
    1111
    1212#define T(String) gettext(String)
Note: See TracChangeset for help on using the changeset viewer.