ReTread the Old Coder's Head ??

Discussion in 'OnBoard Electronics & Controls' started by TerryKing, Nov 9, 2007.

  1. TerryKing
    Joined: Feb 2007
    Posts: 595
    Likes: 25, Points: 28, Legacy Rep: 289
    Location: Topsham, Vermont

    TerryKing On The Water SOON

    I know some of you guys have written software...

    I would like your advice on how I should get started on writing some significant software that will run in the WIN-XP environment.

    I've done a lot of coding and electronics design over many years, various assemblers, Pascal, 'C', BASIC. But I have never written anything in the new (to me) world of WIN-XP, .NET, XML and All That.

    I have been working for some time on a collaborative project (on BoatDesign.Net) to define and prototype a "Multi-Purpose Onboard Computer System" for use on boats. This will be a Mini-ITX system with something like TinyXP, and quite a bit of external hardware. Take a look at:
    http://www.boatdesign.net/forums/showthread.php?t=19458
    if you're interested in the gory details. And there's a quick look at the proposed layout for the boat helmsman at the end of this post.

    There are 2 parts here: The part inside the dashed line is a 19" LCD display, and the 3 sides are hardware panels. The NAV software is stock OziExplorer. I need to do the right side and lower sections in display software that is now non-existent! This will include interfacing to the boat sensors and controls via USB, and creating Meters and Dials etc.
    The hardware panels have capacitive touch switches that end up coming in as USB keyboard keystrokes. I Think...

    So, I AM confused. Where to start? Should I use VB.NET? Java?? Delphi? 'C' or 'C#' in another environment? What would support good graphics for dials and meters without coding it all myself? How do I force exact positioning of windows on the screen and not allow them to be covered up? Who's on First?

    I just got VB Studio Express Edition. Could that work for this stuff? I've used earlier Visual BASIC for a couple things.

    I'm am willing and eager to spend the next 100 hours or more learning the software tools to do this. I've survived everything from System 7 Assembler on punch cards to OS/2 graphics, but it's time to retread the old head and get started.

    What would you do? Where would you start?

    Any suggestions, pointers to resources, comments appreciated!

    [​IMG]
     
  2. thekl0wn
    Joined: Dec 2007
    Posts: 9
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: PoCo, IN

    thekl0wn I'm Afraid of Water!

    Let me know on the programming end of things... Which final direction you choose etc. I may be able to help through some of this stuff, though all my experience is in everything but C, even if we're moving towards C# at work.

    You can learn a TON just by playing around with VisualStudio. You'll fast learn whether you need to upgrade your memory as well! The best part about Microsoft pushing the .NET world is the integration. You can develop components in one language and use them in another.

    And as far as the "pretty's" go, the sky is pretty much the limit... Coding custom controls really isn't terribly hard. A quick internet search can yield many different "skins" for custom dials, etc. On stuff I've done in the past, I like to "mode" my objects, so that I can go into an options screen and change the look from "analog" to "digital". (personally, I think digitized analog displays are slick, even if when one thinks about it is odd...)

    As far as XML goes, I wouldn't worry. In one sitting on the toilet with an O'Reilly book (XML In A Nutshell -- Highly reccomend any O'Reilly book if you're a book nut, like me) and I had a firm grasp on what this scripting language was all about, and I've used it in many non-MS apps. Things like controlling your button features, skins, etc. are great to utilize XML. Basically, it's a super-simple poor-man's database, that's completely supported on the barebones operating system, and there's TONS of external applications and internal plugins to help with about any portion of it!
     
  3. masalai
    Joined: Oct 2007
    Posts: 6,823
    Likes: 120, Points: 0, Legacy Rep: 1882
    Location: cruising, Australia

    masalai masalai

    Do it for the Linux platform and find thousands of willing programmers. The only "drawback" is that the software becomes "open source" ie, from what I understand, is the source code and notes are publicly shared but copyright under GPL rules to stop MS users from porting it and profiting by selling the ap to MS users. The ap must be freely available to non commercial enterprises (who do not sell the software - but I think you can still sell your products generated from that software)

    also look at http://e.webring.com/hub?page=1&ring=gpsusers&list and
    http://www.gpsdrive.de/ which is a linux ap similar to your description & being open, most of the work is done. Just add your theme etc It works.
     
  4. thekl0wn
    Joined: Dec 2007
    Posts: 9
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: PoCo, IN

    thekl0wn I'm Afraid of Water!

    Some people love the Linux environment. I know many of the older generation, hobbiest especially who love their Linux. I, on the other hand, have no real use for it. For a project like this, Linux may be a valid option. I tend to let my thoughts drive into the business world, where moving toward Windows is becoming more standardized. You would have to check on the nav software though... That could be the breaker, though I'm not sure.
     
  5. masalai
    Joined: Oct 2007
    Posts: 6,823
    Likes: 120, Points: 0, Legacy Rep: 1882
    Location: cruising, Australia

    masalai masalai

    Linux now has capabilities that offer direct replacement for most microsoft produced apps (browsers/email etc, office (includes read & write PDF and many other formats) an OS that does not need to be defragmented, has security that MS users only dream of. Why do you think most ISP's Google and many other busy sites use Linux (including the cray and other worlds fastest machines)
     
  6. marshmat
    Joined: Apr 2005
    Posts: 4,127
    Likes: 146, Points: 0, Legacy Rep: 2043
    Location: Ontario

    marshmat Senior Member

    This is the first I've heard of this. If anything, I'd say the Windows push is becoming less and less the standard, especially with the major flaws in Vista that are holding it back from continuing the Windows legacy. Servers are going Linux, big clusters are going Linux... and bit by bit so are desktops, where Win-only applications are not mandatory.
    You can write proprietary software for Linux, no prob. It's just that the GNU GPL model works so much better, that few people do.
    For the record, I use WinXPP.... simply because much of the software I need isn't available for anything else, yet....
     
  7. TerryKing
    Joined: Feb 2007
    Posts: 595
    Likes: 25, Points: 28, Legacy Rep: 289
    Location: Topsham, Vermont

    TerryKing On The Water SOON

    Programming IS Fun...

    Hey, Klown, thanks for the perspectives and pointers...

    I just have to get down to it. I've looked at XML just a little, and you're right.. it helps to think of it as a database or set of descriptive data.

    I'm confused about where some stuff comes from in a NET application. Like for Analog dials, especially.. A "Plug-In" is somebodys Library Code?? A "Skin" is.. What?? Hmmm... Say I have some simple integer data like Temperature or Pressure, and I want to make an analog dial in a NET application written in VB or C++ etc. What are some ways of doing that? What are some GOOD :confused: ways of doing that?

    Any pointers appreciated!
     
  8. TerryKing
    Joined: Feb 2007
    Posts: 595
    Likes: 25, Points: 28, Legacy Rep: 289
    Location: Topsham, Vermont

    TerryKing On The Water SOON

    The Business and Boating Worlds

    I have no religious preconceptions in the OS wars... If there was a really good reasonably-priced NAV application in Linux I'd really consider going there.

    But the NAV part is critical, and I personally really like OziExplorer because I can make maps at any scale and calibrate them exactly. I haven't found the charts for Skekou-to-Hong Kong yet, but I have calibrated GoogleEarth maps that show which side of the dock the ferry tied up to.

    The rest is onboard systems monitoring and control and human interface which could be done in any OS.

    Then there's 'conveniences' like browsers and email clients and Photoshop and other stuff we would LIKE to have at anchor that we already know and like. The "Know and Like" part may be XP for some, and Linux for others, and MAC-OS for others.

    I'm prototyping with a stripped-down TinyXP that runs well on a 10GB drive and 256M RAM. But, the future has caught up with us, and the Prototype has $250 worth of system that's 1 Ghz, 1 GB RAM. And an 80 GB 2.5" drive that cost $56. Total system power running Ozi is 12 watts. PLUS the LCD Display which is another thing to research.

    So I don't think it's necessary to strip OS and applications down too much!

    Long Run, I'd love someone to build an OS/Software version that ran on whatever OS I do not write for!

    And, to make things even more confusing, the prototype system has enough resources to run Virtualization, and simultaneous XP and Linux and maybe Tiger Too!

    This is all good news, but the bad news is I gotta get past Analysis Paralysis and make something work soon :cool:
     
  9. masalai
    Joined: Oct 2007
    Posts: 6,823
    Likes: 120, Points: 0, Legacy Rep: 1882
    Location: cruising, Australia

    masalai masalai

    Terry, some of the linux programmers are stuck in geekdom language as it is an effective shorthand, Just like my recent "abuse" in a thread about the many acronyms for catamarans found on this forum.

    Direct communication with the guy who wrote gpsdrive should be obliging or put you in touch with someone who can talk in English (I may be wrong, but I don't feel he is a confident communicator outside of the German language).

    There are quite a few linux programmers in your region.

    "plug-in" is a little patch to give additional features and mostly automatically attaches to the appropriate application such as animations for your browser. In linux use it freely.

    Skin is the external appearance which in a music player may have several "looks" available (sliders/nobs, analog vu meters/simulated bar graph leds, Brushed metal/matte black finish etc..

    Apps can be written in C++ & variations, python or a number of individually favoured languages. at this stage porting is not too difficult if it includes notes and appropriate comment and written in a logical and consistent form, and then compiled for the platform (OS/machine) of choice, this stage is often called "a binary".

    Have a good look at - - gpsdrive - - by using it a bit, then make notes of the changes desired, collaborate with the author and seek assistance from other people in linux community by posting and supporting a site of your own.

    For general Linux updates look at http://distrowatch.com. It may take a little while, but many like-minded programmers await motivation &/or a project where their name will be in the list of credits.

    Think of "analog" presentation as another "digital" display. Think of a clock face, even with a sweep second hand, which becomes little more than a series of digital images pre-set to show at a predetermined digital value.

    Analogue input requires a modulator/demodulator (modem) to convert analogue signals to a digital value recognised and capable of being manipulated in/by a computer application. Your computer has a dial-up modem, and for broadband, the modem is external usually; and each have different input frequency responses/bandwiths. sometimes modems are also called AD/DA devices (AnalogDigital)
     
  10. masalai
    Joined: Oct 2007
    Posts: 6,823
    Likes: 120, Points: 0, Legacy Rep: 1882
    Location: cruising, Australia

    masalai masalai

    As an win 96?/XP user, Linux Mint will be a very easy transition. Look and feel is surprisingly similar & it will ask if you want to import your existing settings/favourites/addresses etc. but not I feel old emails or off-line browsing data.
     
  11. Tim B
    Joined: Jan 2003
    Posts: 1,438
    Likes: 59, Points: 0, Legacy Rep: 841
    Location: Southern England

    Tim B Senior Member

    I'm glad to see that the politics has died down a bit since the beginning of this thread. I would like to just straighten some things out...

    It doesn't matter which platform you use. Linux is definitely a lot easier to develop in, and provides the tools to do so for free, that's why I like it (there are other reasons, but I won't go into them).

    I'd like to mention this language compatability thing. M$ .NET has not changed any languages. It has just front-ended an existing bit of code with a new bit of code in a different language. Look at all the Fortran fronted with C++. It's been going on for years! M$ are once again slow off the mark.

    I think the difficult stuff to port is going to be the UI. The backend libraries should be relatively easy, as only the code managing the physical interfaces will need changing. Therefore, to simplify porting the UI, I would strongly suggest using QT4. As it runs on all 3 (Win, Mac, Linux) major platforms. QT4 is free for non-commercial use. If you're starting from scratch, it will serve you well to use a cross-platform tool.

    In my opinion the days of platform-specific code are numbered.

    Cheers,

    Tim B.
     
  12. TerryKing
    Joined: Feb 2007
    Posts: 595
    Likes: 25, Points: 28, Legacy Rep: 289
    Location: Topsham, Vermont

    TerryKing On The Water SOON

    Qt4 ?

    Tim, I took a quick look at QT4. Have you used it for GUI stuff?? Are there any examples you know of where it is used for some "Control Panel" like thing with Gauges etc??

    Right now I'm concentrating (When I CAN concentrate) on the PIC NMEA multiplexer stuff, but I want to start working on some UI/Display experiments soon.

    How is your protocol stuff going?
     
  13. Tim B
    Joined: Jan 2003
    Posts: 1,438
    Likes: 59, Points: 0, Legacy Rep: 841
    Location: Southern England

    Tim B Senior Member

    I have used QT3 quite a lot, and it is as good as any proprietry development environment I have used (MS or Borland). QT3 is no longer officially supported, so it makes sense to upgrade a bit. QT4 should be much more powerful, and hopefully faster. For the sort of GUI work it is capable of, look at some of the more artistic KDE4 offerings.

    I have seen QT-based packages that include guages, but I can't remember what they were!! as with (almost?) all development environments, you can either use the in-built ones, or add your own. I'll build up an app tonight (I hope) so you can see what it's like.

    Protocol stuff is moving slowly, hopefully will work on it a bit this weekend.

    Cheers All,

    Tim B.
     
  14. masalai
    Joined: Oct 2007
    Posts: 6,823
    Likes: 120, Points: 0, Legacy Rep: 1882
    Location: cruising, Australia

    masalai masalai

    Thank you guys, I feel I detect some synergy there. I have a bluetooth gps which is partially solar-powered, I will donate it to your project if you can use it. contact me by PM.
    http://www.pioneercomputers.com.au/products/search.asp?search=gps&submit.x=0&submit.y=0

    DreamBook Mini Solar Bluetooth GPS Receiver
    Applications
    • Adopt SiRF Star III chipset.
    • 32-Channel GPS Receiver for fast acquisition and reacquisition.
    • Smallest Solar Power Bluetooth GPS Receiver with SiRF Star III
    • Fast Position Fix ,Cold start<41s,Hot start<1s
    • Vehicle tracking & Location base services
    • Capable of operating indoors and tracking signals down to -159dBm
    • 200,000+ effective correlations for fast TTFF
    • Dual Power Supply - Built in rechargeable Lithium ion battery & Solar power
    • Compatible with Bluetooth Serial Port Profile (SPP) in 10m wirelessly.
    including AC adaptor and Car Charger
     

  15. Tim B
    Joined: Jan 2003
    Posts: 1,438
    Likes: 59, Points: 0, Legacy Rep: 841
    Location: Southern England

    Tim B Senior Member

    Ok, someone was asking about gauges...

    This is the result of a short experiment with QT4. It's not quite as intuitive as some IDEs I've used, but you have MUCH more control.

    Anyway, I thought I'd attach some pics, and the source is there too. The source should be platform independant, but I'll port it to Win32 now anyway.

    Cheers All,

    Tim B.
     

    Attached Files:

Loading...
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.