1

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?

chebad
  • 919
  • 1
  • 13
  • 29

2 Answers2

0

My question is what is the biggesest number that LineChart from AndroidPlot can handle?

Anything that fits into a Java Double will work. Beyond that, the details of your specific issue are unclear. What are you expecting to see happen and what are you actually seeing happen? Are exceptions being thrown?

Nick
  • 8,181
  • 4
  • 38
  • 63
0

I am using RN4020 BLE hardware. Form my hardware, the characteristic.getValue() will return 20 bytes chuck at a time. The hardware will spit the notifying data if the data exceed more than 20 bytes. I don't know whether it a hardware specific.

For example, if the hardware sent 36 bytes information into the application through notification. The application will get two notification with the first chunk as 1-20 bytes and the second chunk as 21-36. I hope this will help you.

Nithinjith
  • 1,775
  • 18
  • 40