Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

Android App

Options
1679111215

Comments

  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
    javier,

    This is the only and the latest I have posted.

    https://www.dropbox.com/s/3vvwcf82xkper3w/app-debug.apk?dl=0

    It will be a long time before I post any updates, as I am in the process of redoing it from scratch.

    William

  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Options
    Oh, no way William, what are you doing it from scratch for, if you don't mind me asking?
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
    Walt,

    My program is one big activity with zero fragments.  I want to to break it up into separate classes, each with a specific function.  I also want to redesign the UI using fragments.  Not really starting from scratch, as most of the code will get reused to some extent.  But it has got way too convoluted, and  want to start fresh with a new project.

    My plan is to build out a tabbed layout using fragments, that I can build off of.  Then take my existing code and break it up into smaller classes. 

    This way I can focus on a piece at a time, get it working the way I want, then move on to the next.  Starting from a tabbed UI, will give me more real estate.

    I want to utilize swipe instead of a knob for tuning..etc..etc..etc.   I can still have a tab fragment that uses the knobs if I so desire.  But I need to start fresh with a framework I can build off of. 


    William


  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Options
    That is very close to what I'm doing. so I guess now I'll have to up my game. While Maestro is interesting, it won't compare to what we will be running on the Nexus, full SSDR compatibility plus other features. You'll find working with fragments much easier.
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
    Walt,

    Maybe you can help me with something.  Just for fun I am making my own waterfall from the FFT data.  I am at this point able to draw a single line on canvas at 0,0.  This line is composed of pixels each with a color based on its dbm.  The colors are a gradient range from black to white.

    If I manually shift y+1 on each draw, I get a working waterfall that scrolls down.

    Now my problem is, I want the most recent data to always be at 0,0 and the second most recent data to be 0,1 and so on.

    I can not find a way shift the canvas down one pixel so that the new data does not draw over the existing line.

    William
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
    NM I figured it out.  Starting to hate android..LOL

    I had to to draw and translate to a offscreen canvas/Bitmap, then draw that bitmap in the surface.

    William
  • W4WHL
    W4WHL Member ✭✭
    edited March 2017
    Options
    Not purdy, but its a working waterfall


    https://www.youtube.com/watch?v=puTVMdNW53M

  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Options
    You create the bitmap 1 pixel in the Y direction and n pixels in the x direction then scroll the view and then print it.

    But you are making that off the SL_VITA_FFT_CLASS? You should use the SL_VITA_WATERFALL class. I am confused how you are creating that from the FFT data.
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
    Walt,

    Just playing around.  Since I'm somewhat stuck on the vita waterfall class.  I just for fun decided to make my own with the FFT data.

    I just dump the fft data into an int array.  I then drawPoint(n,0,paint); scroll the window, repeat!

    As for the paint color, I use a simple gradient based off value n.

    William


  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
    to be exact, although this is hacked together it works, so it was a good experiment.

                        canvas = Panholder.lockCanvas();
                        int w = canvas.getWidth();
                        int h = canvas.getHeight();
                        bitmapoff = Bitmap.createBitmap((int) w, (int) h,
                        Bitmap.Config.ARGB_8888);
                        canvasoff = new Canvas(bitmapoff);
                        canvasoff.setBitmap(bitmapoff);
                        scale = h/200;
                        float xInc = (float) w / (fftint.length - 1);
                        paint.setColor(Color.BLUE);
                        if (tempbit != null) {canvasoff.drawBitmap(tempbit,0,1,paint);}
                        canvasoff.drawLine(w / 2, 0, w / 2, h, paint);



                        for (
                                int i = 0;
                                i < fftint.length - 2; i++)

                        {
                            if (fftint[i] != 0) {
                                float x1 = i * xInc;
                                float y1 = scale * fftint[i];
                                //float x2 = (i++) * xInc;
                                //float y2 = scale * fftint[i + 1];
                                int grayscale = h - Math.round(y1);
                                paint.setColor(Color.rgb(grayscale,grayscale,grayscale));
                                canvasoff.drawPoint(x1, 0, paint);

                            }
                        }
                        canvas.drawBitmap(bitmapoff,0,0,null);
                        tempbit = bitmapoff.copy(bitmapoff.getConfig(), true);
                        Panholder.unlockCanvasAndPost(canvas);

  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
    one more,  The smearing in the above videos, is because of panadapter averaging.  Since this waterfall is using fft data, here is a video with averaging off.  Looks more like it should.


    https://www.youtube.com/watch?v=k8rzWbj96EU

  • DH2ID
    DH2ID Member ✭✭✭
    edited December 2016
    Options
    William, this waterfall looks really good to work with.
    BTW I'm back from Sicily and the Äolian Islands and 14 days of the best
    food and wine...so I'm trying to get back into the ruts again...do you plan to publish a version with waterfall?
    73, Alex DH2ID
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
    I love Sicily.  I lived there for 2 years back in the mid 90's.  I was 21yo back then.  Man did I have fun!

    Yes I plan too at some point.  But its far from ready.

    William
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Options
    I am doing it differently
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
  • James Whiteway
    edited May 2015
    Options
    Getting better and better William! Looking forward to seeing the end results in the Play Store. I'm even willing to pre-order a copy!!! :-)
    james
    WD5GWY

  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
    This morning I played around and created a panfall.  While this is cool, the drawing really taxes my tablet.  This is because of my sloppy coding, but I will fix in due time.  This is just an experiment on how to draw it.  Sorry for the blurry video, **** iphone 5 camera!


    https://www.youtube.com/watch?v=KQqPYU3RzjU

  • James Whiteway
    edited May 2015
    Options
    Just gets better and better! I doubt that I'll ever be where I can add a panafall to my program. But, it will certainly be fun trying. ( I've been digging thru the source code for SDR Sharp and looking at how the panafall is implemented there.)
    james
    WD5GWY

  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Options
    Off topic WIlliam, I found my memory leak! This runs like a scalded cat uses less than 1% cpu. I thought I'd share!
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
    Nice I would like to see it.  I have serious memory issues with my code right now.  and its churning about 30% cpu.  I'm sure I can resolve it with time.  All my performance issues are around onDraw, but I will nail them down eventually. 

    Being new to programming I'm at information overload.  Lots to digest, and takes tinkering ad practice till the light bulb clicks on!  and you have that "ah ha" moment.

    William
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
    James,

    One month ago I said the same thing.  Keep digging and you will get it.

    William
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Options
    Well, depending on what it is running on 30% may not be so bad. 30% does not tell a lot, 30% of a Cray or 30% of an Apple I.  If you do your drawing in SurfaceView then the system will pass the draw off to OpenGL, well, again, depending on what you are running on there may be no GPU to pass off to so Prism would end up doing it, in your case. It is still worth programming it as if there were GPUs. The one thing nice about the Nexus 9, and a huge part of why I bought it, 192 GPU cores. S(er)SDR was the prime motivating factor to get a tablet. Since FRS announced Maestro I now have a nearer target. The difference between what I have and Maestro is mine can be thrown in a suitcase without knows breaking off, it will support however many panadapters your 6000 has. At first glance it looks like SSDR. So, it'll have to be this quarter. There was a reason I deliberately did that. I am not real sure that decision was sound so I may rethink that. I was thinking, too, that it would be prudent to show it to Steve Hicks before any YouTube videos, esp given it's proximity in appearance and behavior.
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
    True,  This is an older tablet
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Options
    OK, now I do feel old. I'll have to look up how to upload stuff to youtube. Are all your videos to you're whatever-it-is-others can subscribe-to, or is there a private space you can put things in? Do you have to pay for YouTube hosting?
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Options
    OK, that couldn't be much easier...channels, that was the term I was searching for.
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Options
    Its public space, and its free.  You can upload directly from your phone.  Just use your google account.
  • Ken - NM9P
    Ken - NM9P Member ✭✭✭
    edited December 2016
    Options
    Well done, William.
    It just keeps getting better and better!

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.