Code Monkey home page Code Monkey logo

Comments (13)

osqzss avatar osqzss commented on July 21, 2024

Sorry for the trouble. I'm not a Linux person, and the code was only tested on the Windows. You can find the source code for the "khbit" and "getch" equivalents for Linux on the net.

from bladegps.

zimler avatar zimler commented on July 21, 2024

@nzkarit does this help at all? https://sourceforge.net/projects/linux-conioh/ or this http://stackoverflow.com/questions/29335758/using-kbhit-and-getch-on-linux

from bladegps.

keith-citrenbaum avatar keith-citrenbaum commented on July 21, 2024

I've forked this repo and got it compiling and running on Linux with only a few tweaks, mostly just using ncurses for getch (from ncurses-dev) and adding a little khbit function, plus a small change to the Makefile to link to the ncurses lib.

I haven't coded in C for many years now, so there's probably some improvements that can be made to whatever I do.

I'm going to clean it up a bit this weekend and see if osqzss wants to pull it, but if you're interested in playing with it now it's available here:

https://github.com/keith-citrenbaum/bladeGPS

I'm going to also try to get it cycling on OS X as well this weekend.

from bladegps.

Robert-steve avatar Robert-steve commented on July 21, 2024

@keith-citrenbaum there seems to be an issue with your code while using the interactive mode. No key can be pressed, I can't even exit the program using Ctrl+C.

from bladegps.

keith-citrenbaum avatar keith-citrenbaum commented on July 21, 2024

Ack! You're right @Robert-steve. I just tested it with the static mode, not interactive. I'll take a look at it this evening.

from bladegps.

Robert-steve avatar Robert-steve commented on July 21, 2024

I think that it would be better to use getchar() instead of getch(). I will test and give some feedback.

from bladegps.

TachyonZZ avatar TachyonZZ commented on July 21, 2024

Anyone ever able to compile this in Linux with functional interactive mode? I tried keith-citrenbaum's code however I continued to run into ncurses errors. I also tried to run the windows complied version in wine (with ubuntu) and couldn't get it to initialize the bladeRF. I think wine can work, but I'd rather find a way to run this natively in linux if possible, thank you.

from bladegps.

osqzss avatar osqzss commented on July 21, 2024

Try to build from the latest source. It's not working quite right but can be some help. I couldn't figure out the way to clear the STDIN buffer after reading a single character with getchar().

from bladegps.

TachyonZZ avatar TachyonZZ commented on July 21, 2024

Indeed this works thank you very much!

from bladegps.

osqzss avatar osqzss commented on July 21, 2024

I have added a little more touch. It works much better.

from bladegps.

TachyonZZ avatar TachyonZZ commented on July 21, 2024

I just compiled it on raspbian and got some warnings: tmax.mm, hh, etc "may be used uninitialized in this function" However it appears to run fine. I couldn't get a fix but that could have been because I was lazy and used the 2 year old brdc file in the directory as opposed to grabbing a new one and setting an appropriate time. (I get some live sky leakage where I'm at.)
I have been able to get a fix using raspbian with gps-sdr-sim and bladerf, so it definitely works with the pi. Anyway thanks again.

from bladegps.

szakacsm avatar szakacsm commented on July 21, 2024

gpssim.c uses conio.h, which from my googling is Windows only. When you run make on linux you get the following error:

user@ubuntu:~/bladeGPS$ make
gcc -O3 -Wall -I../bladeRF/host/libraries/libbladeRF/include   -c -o gpssim.o gpssim.c
gpssim.c:19:19: fatal error: conio.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'gpssim.o' failed
make: *** [gpssim.o] Error 1

Hello, I have problem with installation:
cd ../../../bladeGPS: no directiory
which folder should I navigate?

from bladegps.

safayetmuntasirnahin avatar safayetmuntasirnahin commented on July 21, 2024

I can't compile a program containing conio.h
I use linux mint ulyana
I wrote the code in visual studio code.
Can any one help me?

from bladegps.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.