ok christian last question i promise
so i got the webserver implemented and working, however the second it does a single hash i am unable to display the hashrate and it crashes ccminer.
so i set the code to display a static number, hashes fine, so i tried to send up the hashrate into the query
so at the top i declared a new static double
static double display_hashrate;
then set my webcode to display it, and went down into the share_result function and below
sprintf(s, hashrate >= 1e6 ? "%.0f" : "%.2f", 1e-3 * hashrate);
i declared
display_hashrate = hashrate;
so their both doubles, except that display_hashrate should be a global variable?
but the second it runs the code to set a value for display_hashrate, if i try and load the webpage it crashes ccminer, like it was unable to set the variable or something went wrong.
am i declaring the display_hashrate variable incorrectly?
thanks
UPDATEok so i changed some declarations and it seems that there is an issue accessing the global variable
so this is the change i made, so i added this peice of code in after the display hashrate line
sprintf(s, hashrate >= 1e6 ? "%.0f" : "%.2f", 1e-3 * hashrate);
display_hashrate = 16;
in theory that means that every time it tries to submit shares it should set the value of the variable to 16. at the top i then declared
so the variable is there as a global variable. and the website code is set to
mg_printf_data(conn, "%s", display_hashrate);
now it is just constantly displaying (null) because for some reason the "display_hashrate = 16;" part is not updating the value.