mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-04 23:18:28 -04:00
43262a573f
Strip the stdio integration from FastSerial as we aren't using it and it just wastes space. Note that this does not attempt to fix the bogus floating point handling in ::print(ln). That's an issue for another day. BetterStream::printf(_P) aka FastSerial::printf(_P) support is now as documented for avr-libc printf with floating point support enabled. git-svn-id: https://arducopter.googlecode.com/svn/trunk@895 f9c3cf11-9bcb-44bc-f272-b75c42450872
34 lines
915 B
C++
34 lines
915 B
C++
// -*- Mode: C++; c-basic-offset: 8; indent-tabs-mode: nil -*-
|
|
//
|
|
// Copyright (c) 2010 Michael Smith. All rights reserved.
|
|
//
|
|
// This is free software; you can redistribute it and/or modify it under
|
|
// the terms of the GNU Lesser General Public License as published by the
|
|
// Free Software Foundation; either version 2.1 of the License, or (at
|
|
// your option) any later version.
|
|
//
|
|
|
|
#ifndef __BETTERSTREAM_H
|
|
#define __BETTERSTREAM_H
|
|
|
|
#include <Stream.h>
|
|
#include <avr/pgmspace.h>
|
|
|
|
class BetterStream : public Stream {
|
|
public:
|
|
BetterStream(void) {
|
|
}
|
|
|
|
// Stream extensions
|
|
void print_P(const char *);
|
|
void println_P(const char *);
|
|
void printf(const char *, ...);
|
|
void printf_P(const char *, ...);
|
|
|
|
private:
|
|
void _vprintf(unsigned char, const char *, va_list);
|
|
};
|
|
|
|
#endif // __BETTERSTREAM_H
|
|
|