Skip to content

Commit

Permalink
Merge pull request #300 from OpenSprinkler/request-too-large-fix
Browse files Browse the repository at this point in the history
Request too large fix
  • Loading branch information
arfrie22 authored Jul 31, 2024
2 parents 52889c8 + 8d8890f commit 0ad54ed
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions OpenSprinkler.service
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ RestartSec=1
User=root
WorkingDirectory=__OpenSprinkler_Path__
ExecStart=/bin/bash -c ./startOpenSprinkler.sh
StandardError=journal
StandardOutput=journal
StandardInput=null

[Install]
WantedBy=multi-user.target
8 changes: 4 additions & 4 deletions defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,10 @@ enum {
#else
#include <stdio.h>
#define DEBUG_BEGIN(x) {} /** Serial debug functions */
inline void DEBUG_PRINT(int x) {printf("%d", x);}
inline void DEBUG_PRINT(const char*s) {printf("%s", s);}
#define DEBUG_PRINTLN(x) {DEBUG_PRINT(x);printf("\n");}
#define DEBUG_PRINTF(msg, ...) {printf(msg, ##__VA_ARGS__);}
inline void DEBUG_PRINT(int x) {fprintf(stdout, "%d", x);}
inline void DEBUG_PRINT(const char*s) {fprintf(stdout, "%s", s);}
#define DEBUG_PRINTLN(x) {DEBUG_PRINT(x);fprintf(stdout, "\n");}
#define DEBUG_PRINTF(msg, ...) {fprintf(stdout, msg, ##__VA_ARGS__);}
#endif

#else
Expand Down
2 changes: 2 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2016,6 +2016,8 @@ static void perform_ntp_sync() {

#if !defined(ARDUINO) // main function for RPI/BBB
int main(int argc, char *argv[]) {
// Disable buffering to work with systemctl journal
setvbuf(stdout, NULL, _IOLBF, 0);
printf("Starting OpenSprinkler\n");

int opt;
Expand Down

0 comments on commit 0ad54ed

Please sign in to comment.