Re: Text files download blank, with no text.
Posted: Tue Jan 01, 2019 2:15 pm
Your code needs to be reviewed and picked-over as there are various issues, some which are perhaps benign, and others which are masking other problems.
I see you have gone back to your bad old ways of adding wdt resets when your code is misbehaving - this is never a good idea, you are just papering over the cracks.
I looked at the magnet processing code :
Which makes no sense : you have a while followed by an if which is doing the same thing - the if is superfluous.
On the quarter hour you will furiously call listen function as fast as you can until the second ticks over. The listen function does a wifi connect and also spews out serial prints. That is assuming I understand it as the listen function is only (!) 500 lines long. How you imagine anyone can assist with code which is 'designed' like this is beyond me.
You see, I thought I would give you a hand this time, hoping you had taken on board what I said many months ago, but all that has happened is that I am irritated, as I think you are asking way too much when the code is in such a mess.
I see you have gone back to your bad old ways of adding wdt resets when your code is misbehaving - this is never a good idea, you are just papering over the cracks.
I looked at the magnet processing code :
Code: Select all
while( magnet == 1 )
{
/* Wait for the ISR to set the
* flag; reset it before
* taking any action. */
if (magnet)
{
if ((MINUTE % 15 == 0) && (SECOND == 0))
{
listen();
}
else
{
magnet = 0;
rainCounter();
}
}
Which makes no sense : you have a while followed by an if which is doing the same thing - the if is superfluous.
On the quarter hour you will furiously call listen function as fast as you can until the second ticks over. The listen function does a wifi connect and also spews out serial prints. That is assuming I understand it as the listen function is only (!) 500 lines long. How you imagine anyone can assist with code which is 'designed' like this is beyond me.
You see, I thought I would give you a hand this time, hoping you had taken on board what I said many months ago, but all that has happened is that I am irritated, as I think you are asking way too much when the code is in such a mess.