AndroidPlot library, problem with data sending

19 views
Skip to first unread message

Damian Cheba

unread,
Jan 6, 2018, 11:06:24 AM1/6/18
to Androidplot
Hello!
I have a program on micro-controller (uC) which send data in `intmax_t` format (my goal is to send 19 bytes). I'm receiving on my Android app value which is send from uC (I'm sending data through Bluetooth Low Energy module). Then I'm parsing this value and putting it as `Double`. Here it is my code for this operations:

        byte[] bytes = characteristic.getValue();
        String val = new String(bytes);
        String[] couple = val.replaceAll("\r\n","\n").replaceAll("\n\r","\n").replaceAll("\r","\n").split("\n");
        double dValue;
        for (String aCouple : couple) {
            if (aCouple != null && !aCouple.isEmpty() && !aCouple.equals("\n")) {
                dValue= Double.parseDouble(aCouple);
                PlotUtills.addNextSample(dValue);   
            }
        }

My question is what is the biggesest number that `LineChart` from `AndroidPlot` can handle? Maybe something is incorrect in my conversion?
Greetings!
Reply all
Reply to author
Forward
0 new messages