Results 1 to 2 of 2

Thread: QT Creator Serial Port Plotter

  1. #1
    Join Date
    Dec 2018
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default QT Creator Serial Port Plotter

    I'm new to QT Creator I have never ussed it before. I need to change a little thing of this amazing program I'm ussing to graph serial data comming from an Arduino sensor:

    https://os.mbed.com/users/borislav/n...r/#commentform

    Basically I'm doing an electrocardiogram and this program works perfectly but I need to change the X-axis scale cause is a standard medical thing, I need to modify the graph in that way so every little square values actually worth 40 milliseconds (in red), is there a way to do this? That would mean that after 25 squares there's 1 second.

    I was recommended to add this lines in the mainwindow.cpp code (around line 221):

    QSharedPointer fixedTicker(new QCPAxisTickerFixed);
    ui->plot->xAxis->setTicker(fixedTicker);
    fixedTicker->setTickStep(40.0);
    fixedTicker->setScaleStrategy(QCPAxisTickerFixed::ssNone);

    But it doesn't work as needed, it changed as shown in the image below .


    1.jpg

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    3,929
    Thanks
    229
    Thanked 615 Times in 605 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: QT Creator Serial Port Plotter

    Your link doesn't work and I'm not going to try to figure out where the code is on the mbed site. And your image is so faint that it isn't apparent what you think is wrong.

    Why don't you copy and post the actual code in question? The instructions in my signature (below) explain how to do that so it creates a readable post.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Serial read misses to read data from the serial port
    By mania in forum Qt for Embedded and Mobile
    Replies: 11
    Last Post: 18th August 2014, 09:49
  2. qt serial port
    By saman_artorious in forum Newbie
    Replies: 9
    Last Post: 24th April 2013, 17:19
  3. Replies: 13
    Last Post: 8th August 2012, 09:26
  4. Serial Port
    By b1 in forum Qt Programming
    Replies: 2
    Last Post: 18th January 2007, 03:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.