Give water to plants if dry amd pla meanwhile music the music vou can define with note length bind and breake also select several instruments for the sound
DebugTrace.h@0:5150b09127e3, 2012-09-19 (annotated)
- Committer:
- helmut
- Date:
- Wed Sep 19 14:16:56 2012 +0000
- Revision:
- 0:5150b09127e3
plays mostly music that you can do with notes length breakes and bind; Some already defined; Tool is to start a pump for water to give plant is too dry.; Meanwhie plays music the most part of all
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
helmut | 0:5150b09127e3 | 1 | /* |
helmut | 0:5150b09127e3 | 2 | * DebugTrace. Allows dumping debug messages/values to serial or |
helmut | 0:5150b09127e3 | 3 | * to file. |
helmut | 0:5150b09127e3 | 4 | * |
helmut | 0:5150b09127e3 | 5 | * Copyright (C) <2009> Petras Saduikis <petras@petras.co.uk> |
helmut | 0:5150b09127e3 | 6 | * |
helmut | 0:5150b09127e3 | 7 | * This file is part of DebugTrace. |
helmut | 0:5150b09127e3 | 8 | * |
helmut | 0:5150b09127e3 | 9 | * DebugTrace is free software: you can redistribute it and/or modify |
helmut | 0:5150b09127e3 | 10 | * it under the terms of the GNU General Public License as published by |
helmut | 0:5150b09127e3 | 11 | * the Free Software Foundation, either version 3 of the License, or |
helmut | 0:5150b09127e3 | 12 | * (at your option) any later version. |
helmut | 0:5150b09127e3 | 13 | * |
helmut | 0:5150b09127e3 | 14 | * DebugTrace is distributed in the hope that it will be useful, |
helmut | 0:5150b09127e3 | 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
helmut | 0:5150b09127e3 | 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
helmut | 0:5150b09127e3 | 17 | * GNU General Public License for more details. |
helmut | 0:5150b09127e3 | 18 | * |
helmut | 0:5150b09127e3 | 19 | * You should have received a copy of the GNU General Public License |
helmut | 0:5150b09127e3 | 20 | * along with DebugTrace. If not, see <http://www.gnu.org/licenses/>. |
helmut | 0:5150b09127e3 | 21 | */ |
helmut | 0:5150b09127e3 | 22 | |
helmut | 0:5150b09127e3 | 23 | #ifndef SNATCH59_DEBUGTRACE_H |
helmut | 0:5150b09127e3 | 24 | #define SNATCH59_DEBUGTRACE_H |
helmut | 0:5150b09127e3 | 25 | |
helmut | 0:5150b09127e3 | 26 | enum eLog {OFF, ON}; |
helmut | 0:5150b09127e3 | 27 | enum eLogTarget {TO_SERIAL, TO_FILE}; |
helmut | 0:5150b09127e3 | 28 | |
helmut | 0:5150b09127e3 | 29 | class DebugTrace |
helmut | 0:5150b09127e3 | 30 | { |
helmut | 0:5150b09127e3 | 31 | public: |
helmut | 0:5150b09127e3 | 32 | DebugTrace(eLog on, eLogTarget mode, const char* fileName = "log.txt", const int maxSize = 1024); |
helmut | 0:5150b09127e3 | 33 | ~DebugTrace(); |
helmut | 0:5150b09127e3 | 34 | |
helmut | 0:5150b09127e3 | 35 | void clear(); |
helmut | 0:5150b09127e3 | 36 | void traceOut(const char* fmt, ...); |
helmut | 0:5150b09127e3 | 37 | |
helmut | 0:5150b09127e3 | 38 | private: |
helmut | 0:5150b09127e3 | 39 | eLog enabled; |
helmut | 0:5150b09127e3 | 40 | eLogTarget logMode; |
helmut | 0:5150b09127e3 | 41 | int maxFileSize; |
helmut | 0:5150b09127e3 | 42 | int currentFileSize; |
helmut | 0:5150b09127e3 | 43 | char* logFile; |
helmut | 0:5150b09127e3 | 44 | char* logFileBackup; |
helmut | 0:5150b09127e3 | 45 | int logFileStatus; // if things go wrong, don't write any more data to file |
helmut | 0:5150b09127e3 | 46 | |
helmut | 0:5150b09127e3 | 47 | void backupLog(); |
helmut | 0:5150b09127e3 | 48 | }; |
helmut | 0:5150b09127e3 | 49 | |
helmut | 0:5150b09127e3 | 50 | #endif |