Get code structured using tabs...

#ifdef __IN_ECLIPSE__
//This is a automatic generated file
//Please do not modify this file
//If you touch this file your change will be overwritten during the next build
//This file has been generated on 2018-04-15 09:34:26

#include "Arduino.h"
#include <BlynkSimpleWiFiLink.h>
#include <BlynkWidgets.h>
#include <EEPROM.h>
#include <Grove_LED_Bar.h>
#include <MemoryFree.h>
#include <TimeLib.h>
#include <WiFiLink.h>
#include <UnoWiFiDevEdSerial1.h>
#include "consts.h"
#include "secrets.h"
#include <avr/wdt.h>

void balboaSetup() ;
void balboaReset() ;
void balboaLoop() ;
void beeperLoop() ;
void alarmSound() ;
void beep() ;
BLYNK_READ(GAUGE_WIDGET) ;
BLYNK_WRITE(MANUAL_RUN_BUTTON) ;
BLYNK_WRITE(VALVES_BACK_BUTTON) ;
void blynkSetup() ;
void blynkLoop() ;
void updateWidgets() ;
void buttonSetup() ;
void buttonLoop() ;
boolean elsensLoop() ;
boolean elsensCheckPump() ;
byte overheatedSecondsLeft() ;
int readElSens() ;
void eventsSetup() ;
void eventsLoop() ;
void eventsWrite(int newEvent, int value1, int value2) ;
boolean eventsSaved() ;
void eventsSave() ;
byte eventsRealCount() ;
void eventsPrint(Print& stream) ;
void eventsPrint(Print& s, int ix) ;
void eventsPrintJson(Print& stream) ;
void eventsPrintJson(Print& stream, int ix) ;
void ledBarSetup() ;
void ledBarLoop() ;
boolean manualRunLoop() ;
byte manualRunMinutesLeft() ;
void modbusSetup() ;
boolean modbusLoop() ;
void modbusClearData() ;
boolean requestSymoRTC() ;
boolean requestInverter() ;
boolean requestMeter() ;
boolean requestBattery() ;
boolean modbusError(int err) ;
int modbusRequest(byte uid, unsigned int addr, byte len, int *regs) ;
int timedRead(Stream &is, byte buffer[], size_t len) ;
void pilotLoop() ;
byte power2pwm(int power) ;
void setup() ;
void loop() ;
void handleSuspendAndOff() ;
boolean handleAlarm() ;
boolean restHours() ;
boolean turnMainRelayOn() ;
boolean wifiConnected() ;
void t2s(unsigned long t, char *buff) ;
void sprintfF(char* buf, const __FlashStringHelper *fmt, ... );
void restServerSetup() ;
void restServerLoop() ;
void printValuesJson(Print& client) ;
void printAlarmJson(Print& client) ;
void susCalibLoop() ;
void telnetSetup() ;
void telnetLoop(boolean log) ;
void valvesBackSetup() ;
void valvesBackReset() ;
void valvesBackLoop() ;
void valvesBackStart(int v) ;
boolean valvesBackExecuted() ;
void watchdogSetup() ;
void watchdogLoop() ;

#include "Regulator.ino"

#include "Balboa.ino"
#include "Beeper.ino"
#include "Blynk.ino"
#include "Button.ino"
#include "ElSens.ino"
#include "Events.ino"
#include "LedBar.ino"
#include "ManualRun.ino"
#include "Modbus.ino"
#include "PowerPilot.ino"
#include "RestServer.ino"
#include "SusCalib.ino"
#include "Telnet.ino"
#include "ValvesBack.ino"
#include "Watchdog.ino"

#endif
void loop() {

  loopStartMillis = millis();

  handleSuspendAndOff();

  watchdogLoop();
  eventsLoop();

  // user interface
  buttonPressed = false;
  buttonLoop();
  beeperLoop(); // alarm sound
  ledBarLoop();
  blynkLoop();
//  restServerLoop();
  telnetLoop(msg[0] != 0); // checks input commands and prints msg
  msg[0] = 0;  //clear msg

  if (handleAlarm())
    return;

  if (manualRunLoop())
    return;

  valvesBackLoop();

  if (restHours())
    return;

  if (!wifiConnected())
    return;

  susCalibLoop();

  if (modbusLoop()) { // returns true if data set is ready
    balboaLoop();

    if (elsensLoop()) { // evaluates OVERHEATED
      pilotLoop();
    }
    telnetLoop(true); // logs modbus and heating data
  }
}

GitHub repository of the project