Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make changes on SmartPi's source code?
If I want make changes on the smartpi's open source code, how would I go forward on this? 
Do I download the open source code to the SmartPi and make the changes there with an GO IDE for RPI and then build it,
or is it easier to download the source code and make the changes with a GO IDE on a for example windows machine Big Grin  and then remotley update the SmartPi with the new code?

I hope some one can bring some light on this for me.
The easiest way is to install a compiler on the raspberry pi. Change your source on your host and compile on the raspberry pi.
Thanks for the reply.

I have going through the code and I want to add resistance(R=U/I) of the load that I am measuring and I want like the other measurements to be saved to the DB and published on the webpage.  

I hope someone can let me know if I am missing something.  

in src directory 

readout -> main.go -> func pollSmartPi
                            -> func makeReadoutAccumulator
                            -> func makeReadout
            -> files.go -> func writeSharedFile
smartpi -> apihandlerchart.go -> func ServeChartValues
                                           -> func ServeDayValues
           -> apihandlersmomentary.go -> func ServeMomentaryValues 
           -> csv.go -> func CreateCSV
           -> database.go -> func CheckDatabase 
                                  -> type MinuteValues
                                  -> func CreateSQLDatabase
                                  -> func InsertData
                                  -> func ReadChartData
                                  -> func ReadDayData
           -> tools.go -> type ReadoutAccumulator
           -> type tXmlValue

I am looking at the javascript right now to see what I need to do there to get the resistance value published on the webpage. One thing I have not figured out the connection between the SmartPi go code and the JS code but something tells me that it is apihandlersmomentary.go(func ServeMomentaryValues) and js (controllers.js) but I do not know. 

I hope someone can help me and give me some directions.

Best regards 

Forum Jump:

Users browsing this thread: 1 Guest(s)