Meshtastic

Added bleep routine on GPIO13. to toggle high and low to fit a 3.3v active sounder

How do i submit change to github for review my project edit? Using Visual Studio. Coming from a background of Arduino, and don’t quite understand Github and forking principles.
I have created in my version of the project
Sounder.cpp
Sounder.h
and altered on my PC the master project nodeDB.cpp to call the routine when a msg has been received.
I have not added some sort of code to decide if some one has or has not added a sounder. I am sure i will need to add into the configuration code. An IF sounder connected a bit like what when modules use different OLED modules and need different #include files.
Sorry for being such a duffer and using Meshtastic to learn C++ and trying to figure out how to use Github.

2 Likes

I can help you with this. Pm me your email and I’ll invite you to our slack. We can chat there.

1 Like

Hi Mc-Hamster

In an attempt to learn by trial and error to upload/fork my sounder routine.

I had a play with Staging and Github. Managed to get NodeDB.cpp to fork. Also forked MeshService.h by mistake as i made no changes there. I could not work out how to upload my new files Sounder.cpp and Sounder.h so manually uploaded them to my Github folder.

Was i successful in anyway as a contribution or has it not been done properly?

https://github.com/Andy1968T/Meshtastic-device-master

1 Like

Hi,

the usual way is

  • to fork the whole repository “meshtastic-device”
  • clone the repo to your local computer (with a GUI like Sourcetree, GitHub desktop or with git from CLI)
  • open the repo within vscode and do a build, after that do your changes and check if it still builds
  • use GUI or git CLI like described above, stage your files with your changes and do a commit.
  • push your commit to your git server (GitHub)
  • log into github and you will be prompted to do a pull request. Click that button and follow the procedure

And don’t be afraid, it will be fine if you’re doing something wrong, you can’t mess the things up, that’s what github is for :wink:

3 Likes

Ok thanks for the reply.I’am Still not getting the process of this. So once i have made my changes, then uploaded it to my github. When a new update version Meshtastic.master to Meshtastic1.1.5 and i download that zip and uncompressed it to my local folder, I have to start all over adding my code and then upload that to my Git upload. So rather than starting over every time there is a major version change how do i merge the new updated into my latest local folder. Because if i have just edited for example NodeDB.cpp with my bleep(); call to my newly created Sounder.cpp file with the routine in it. But in the mean time you change your version of NodeDB.cpp surely when your new file is merged into my local folder it will revert my code to your code. losing my work. Unless it merges code within the two files. This however has the potential to conflict. As how can it prioritise for example one bit of code over another for example my config uses
[platformio]
default_envs = heltec

yours is

[platformio]

default_envs = tbeam0.7
I want to be working with the latest version. But also want my code to stick
How is this done?

Hi, this is a good tutorial on this topic.

If you use a GIT GUI, like mentioned above, you don’t have to hassle around with zip files and also there are great tools for merging your repo with the original one.