Announcement

Collapse
No announcement yet.

FLTK and obdgpslogger

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • FLTK and obdgpslogger

    Hi,
    I am trying to compile following your instructions, but i'm coming up with an error like this:

    -- Could NOT find FLTK (missing: FLTK_LIBRARIES FLTK_INCLUDE_DIR FLTK_FLUID_EXECUTABLE)

    Do you know how I should link FLTK?

    Thanks for the effort.

  • #2
    What distribution are you using? Or are you using OSX?

    In Linux, you'll need to add the fltk devel packages and fluid. On ubuntu:
    Code:
    sudo apt-get install libfltk1.1-dev libfltk-1.1 fltk1.1-doc fluid
    On OSX, fltk available through fink works [since I've been using it], or you can compile it yourself by downloading fltk-1.1.9.tar.gz, and installing it with:
    Code:
    ./configure --prefix=$HOME/fltk/ --disable-shared
    then set your PATH before running cmake:
    Code:
    PATH=$HOME/fltk/bin:$PATH; export PATH
    cmake .. # Follow other build instructions as before
    Lemme know if that works, or if you need more specific stuff. It's worth noting that obdgpslogger works great wihout the GUI, but you need the GUI if you want real-time visuals on your dials.

    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

    Comment


    • #3
      Thanks Gary.

      I managed to figure it out late last night what the problems were. I am trying to tinker with the GUI and modify it. I am not familiar with Fluid and I couldn't find much documentation on it. Do you have any other documentation besides the one on the FLTK site?

      Thanks again.

      Comment


      • #4
        Sorry, fluid's one of those things that's just kinda opaque - I've found very little decent documentation past the basic tutorial. Mainly I used fltk because it's super fast for prototyping, it's truly ripe for a wx re-write. I really don't like the basic tutorial much because it ends up on a huge spiral of opengl weird stuff and not an awful lot of fluid.

        I came across this: http://seriss.com/people/erco/fltk-v...uid-intro.html. It's pretty simplistic.

        Personally, I find it easier to learn things by having a target to aim for ; what are you trying to change, and I'll give you some pointers on how to get it done?

        Gary (-;
        OBDGPSLogger, for logging OBDII and/or GPS data
        OBDSim, an OBDII/ELM327 software simulator
        mp3car forums: obdgpslogger, obdsim

        Comment


        • #5
          I am just trying to make a sleeker GUI that displays all the things that my car is capable of displaying. Seeing that FLTK is really too simplistic, I might just ditch it and use another language for it. Thanks for all the help. I will write to you if I have anything worthy of contributing.

          Cheers. =)

          Comment


          • #6
            Yeah, fltk's a bit simplistic.

            I was partially using obdgui to teach myself fltk out of curiousity, and partially I wanted something thrown together really quickly. I'm actually leaning towards writing a new wx flavor myself - it just doesn't have graph or dial primitives, and I'm too lazy to write my own [so far]

            Gary (-;
            OBDGPSLogger, for logging OBDII and/or GPS data
            OBDSim, an OBDII/ELM327 software simulator
            mp3car forums: obdgpslogger, obdsim

            Comment


            • #7
              Add Fl_Gauge?

              I found this nice gauge class:
              http://www.kiwacan.co.nz/fltk/Fl_Gauge.html
              and tested it out it works great. But I need help adding it into obdgui. The problem is that it is in h and cxx, but obdgui is in fl and the h and cxx files are generated automatically by Fluid. I found some hint here:
              http://embedded.centurysoftware.com/...-tutorial.html
              and mimicked it by adding
              #include ...
              in the maindisplay.fl file via Fluid. But I don't know how to add the Fl_Gauge.cxx file other than putting it in the same directory as the maindisplay.fl file. I tried to build the project using NetBeans and sure enough it failed trying to link maindisplay.cxx.o due to "undefined" Fl_Gauge function calls. I am stuck. Please help. Thanks!
              PriiDash(TM) open source software
              Enhanced Instrument Panel and Data Logger

              Comment


              • #8
                Should be easy. Just edit CMakeLists.txt, and scroll down to the bit that says:
                Code:
                        FILE(GLOB OBDGUI_SRCS
                            *.c
                            *.cpp
                            *.h
                        )
                Just add .CXX the same, or even just add the filenames in whole. [remember this will be case sensitive]

                Gary (-;
                OBDGPSLogger, for logging OBDII and/or GPS data
                OBDSim, an OBDII/ELM327 software simulator
                mp3car forums: obdgpslogger, obdsim

                Comment


                • #9
                  How to update values?

                  Thanks that helped!

                  Now to update the values I though I just add a line in the maindisplay.fl file settemp(float val) part near the end of the file but it behaves as if the value was set only once for the custom gauge in the beginning while all the other original gauges keeps updating to new values. What am I missing?
                  PriiDash(TM) open source software
                  Enhanced Instrument Panel and Data Logger

                  Comment


                  • #10
                    Originally posted by 2009Prius View Post
                    ...
                    Now to update the values I though I just add a line in the maindisplay.fl file settemp(float val) part near the end of the file but it behaves as if the value was set only once for the custom gauge in the beginning while all the other original gauges keeps updating to new values. What am I missing?
                    OK finally figured it out. Somehow the custom gauge need to call the redraw() function. The fltk built in ones don't.
                    PriiDash(TM) open source software
                    Enhanced Instrument Panel and Data Logger

                    Comment


                    • #11
                      Sorry, this fell off my radar. Good to see you fixed it though!

                      FWIW, Fl::Fl_Graph has exactly the same problem which was also annoying as hell

                      Gary (-;
                      OBDGPSLogger, for logging OBDII and/or GPS data
                      OBDSim, an OBDII/ELM327 software simulator
                      mp3car forums: obdgpslogger, obdsim

                      Comment

                      Working...
                      X