Added microphone TX (very basic for now)

This commit is contained in:
furrtek 2017-03-12 07:10:09 +00:00
parent 44b2fc469c
commit 2d75722b74
7 changed files with 30 additions and 5 deletions

View File

@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc. * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
* Copyright (C) 2016 Furrtek
* *
* This file is part of PortaPack. * This file is part of PortaPack.
* *

View File

@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc. * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
* Copyright (C) 2016 Furrtek
* *
* This file is part of PortaPack. * This file is part of PortaPack.
* *

View File

@ -91,6 +91,8 @@ public:
FIFOSignal = 52, FIFOSignal = 52,
FIFOData = 53, FIFOData = 53,
AudioLevel = 54,
MAX MAX
}; };
@ -628,6 +630,16 @@ public:
uint32_t range = 0; uint32_t range = 0;
}; };
class AudioLevelMessage : public Message {
public:
constexpr AudioLevelMessage(
) : Message { ID::AudioLevel }
{
}
uint32_t value = 0;
};
class AudioTXConfigMessage : public Message { class AudioTXConfigMessage : public Message {
public: public:
constexpr AudioTXConfigMessage( constexpr AudioTXConfigMessage(

View File

@ -83,6 +83,7 @@ constexpr image_tag_t image_tag_ook { 'P', 'O', 'O', 'K' };
constexpr image_tag_t image_tag_adsb_tx { 'P', 'A', 'D', 'S' }; constexpr image_tag_t image_tag_adsb_tx { 'P', 'A', 'D', 'S' };
constexpr image_tag_t image_tag_replay { 'P', 'R', 'E', 'P' }; constexpr image_tag_t image_tag_replay { 'P', 'R', 'E', 'P' };
constexpr image_tag_t image_tag_fsktx { 'P', 'F', 'S', 'K' }; constexpr image_tag_t image_tag_fsktx { 'P', 'F', 'S', 'K' };
constexpr image_tag_t image_tag_mic_tx { 'P', 'M', 'T', 'X' };
constexpr image_tag_t image_tag_noop { 'P', 'N', 'O', 'P' }; constexpr image_tag_t image_tag_noop { 'P', 'N', 'O', 'P' };

View File

@ -67,18 +67,30 @@ struct Color {
static constexpr Color red() { static constexpr Color red() {
return { 255, 0, 0 }; return { 255, 0, 0 };
} }
static constexpr Color dark_red() {
return { 127, 0, 0 };
}
static constexpr Color orange() { static constexpr Color orange() {
return { 255, 127, 0 }; return { 255, 175, 0 };
}
static constexpr Color dark_orange() {
return { 127, 88, 0 };
} }
static constexpr Color yellow() { static constexpr Color yellow() {
return { 255, 255, 0 }; return { 255, 255, 0 };
} }
static constexpr Color dark_yellow() {
return { 127, 127, 0 };
}
static constexpr Color green() { static constexpr Color green() {
return { 0, 255, 0 }; return { 0, 255, 0 };
} }
static constexpr Color dark_green() {
return { 0, 127, 0 };
}
static constexpr Color blue() { static constexpr Color blue() {
return { 0, 0, 255 }; return { 0, 0, 255 };
@ -95,11 +107,9 @@ struct Color {
static constexpr Color light_grey() { static constexpr Color light_grey() {
return { 127, 127, 127 }; return { 127, 127, 127 };
} }
static constexpr Color grey() { static constexpr Color grey() {
return { 91, 91, 91 }; return { 91, 91, 91 };
} }
static constexpr Color dark_grey() { static constexpr Color dark_grey() {
return { 63, 63, 63 }; return { 63, 63, 63 };
} }

View File

@ -83,7 +83,7 @@ void WM8731::init() {
.reserved0 = 0, .reserved0 = 0,
}); });
set_line_in_volume(0.0_dB); //set_line_in_volume(0.0_dB);
headphone_mute(); headphone_mute();
} }

Binary file not shown.