ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
InputFPPRemote.h
Go to the documentation of this file.
1
#pragma once
2
/*
3
* InputFPPRemote.h
4
*
5
* Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver
6
* Copyright (c) 2021, 2025 Shelby Merrick
7
* http://www.forkineye.com
8
*
9
* This program is provided free for you to use in any way that you wish,
10
* subject to the laws and regulations where you are using it. Due diligence
11
* is strongly suggested before using this code. Please give credit where due.
12
*
13
* The Author makes no warranty of any kind, express or implied, with regard
14
* to this program or the documentation contained in this document. The
15
* Author shall not be liable in any event for incidental or consequential
16
* damages in connection with, or arising out of, the furnishing, performance
17
* or use of these programs.
18
*
19
*/
20
21
#include "
InputCommon.hpp
"
22
#include "
WebMgr.hpp
"
23
#include "
InputFPPRemotePlayItem.hpp
"
24
25
class
c_InputFPPRemote
:
public
c_InputCommon
26
{
27
public
:
28
29
c_InputFPPRemote
(
c_InputMgr::e_InputChannelIds
NewInputChannelId,
30
c_InputMgr::e_InputType
NewChannelType,
31
uint32_t BufferSize);
32
33
virtual
~c_InputFPPRemote
();
34
35
// functions to be provided by the derived class
36
void
Begin
();
37
bool
SetConfig
(JsonObject& jsonConfig);
38
void
GetConfig
(JsonObject& jsonConfig);
39
void
GetStatus
(JsonObject& jsonStatus);
40
void
ClearStatistics
();
41
void
Process
();
42
void
GetDriverName
(String& sDriverName) { sDriverName =
"FPP Remote"
; }
43
void
SetBufferInfo
(uint32_t BufferSize);
44
void
ProcessButtonActions
(
c_ExternalInput::InputValue_t
value);
45
void
SetOperationalState
(
bool
ActiveFlag);
46
void
SetBlankTimerIsRunning
(
bool
BlankTimerRunning);
47
48
void
FppStartRemoteFilePlay
(String & FileName, uint32_t ElapsedTimeSec);
49
void
FppStopRemoteFilePlay
();
50
void
FppSyncRemoteFilePlay
(String & FileName, uint32_t ElapsedTimeMS);
51
void
GetFppRemotePlayStatus
(JsonObject& jsonStatus);
52
bool
IsIdle
();
53
bool
AllowedToPlayRemoteFile
();
54
void
SetBackgroundFile
();
55
56
protected
:
57
58
c_InputFPPRemotePlayItem
*
pInputFPPRemotePlayItem
=
nullptr
;
59
int32_t
GetSyncOffsetMS
() {
return
SyncOffsetMS
; }
60
bool
GetSendFppSync
() {
return
SendFppSync
; }
61
62
char
StatusType
[65];
63
64
private
:
65
66
void
validateConfiguration
();
67
void
StartPlaying
(String & FileName);
68
void
StartPlayingLocalFile
(String & FileName);
69
void
StartPlayingRemoteFile
(String & FileName);
70
void
StopPlaying
();
71
bool
PlayingFile
();
72
bool
PlayingRemoteFile
();
73
void
PlayNextFile
();
74
bool
Poll
();
75
76
void
load
();
77
void
save
();
78
79
int32_t
SyncOffsetMS
= 0;
80
bool
SendFppSync
=
false
;
81
char
FileBeingPlayed
[65];
82
char
ConfiguredFileToPlay
[65];
83
bool
Stopping
=
false
;
84
bool
FppSyncOverride
=
false
;
85
uint32_t
FilePlayCount
= 0;
86
87
#define PlayerMemorySize 1096
88
struct
PlayerInfo_t
89
{
90
alignas
(16)
byte
Player
[
PlayerMemorySize
];
91
uint32_t
Id
= 0;
92
bool
InUse
=
false
;
93
};
94
PlayerInfo_t
PlayerInfo
;
95
};
InputCommon.hpp
PlayerMemorySize
#define PlayerMemorySize
Definition
InputFPPRemote.h:87
InputFPPRemotePlayItem.hpp
WebMgr.hpp
c_ExternalInput::InputValue_t
InputValue_t
Definition
externalInput.h:32
c_InputCommon
Definition
InputCommon.hpp:27
c_InputFPPRemote
Definition
InputFPPRemote.h:26
c_InputFPPRemote::StatusType
char StatusType[65]
Definition
InputFPPRemote.h:62
c_InputFPPRemote::FppSyncOverride
bool FppSyncOverride
Definition
InputFPPRemote.h:84
c_InputFPPRemote::SetBackgroundFile
void SetBackgroundFile()
Definition
InputFPPRemote.cpp:740
c_InputFPPRemote::SetConfig
bool SetConfig(JsonObject &jsonConfig)
Set a new config in the driver.
Definition
InputFPPRemote.cpp:345
c_InputFPPRemote::GetDriverName
void GetDriverName(String &sDriverName)
get the name for the instantiated driver
Definition
InputFPPRemote.h:42
c_InputFPPRemote::StartPlaying
void StartPlaying(String &FileName)
Definition
InputFPPRemote.cpp:435
c_InputFPPRemote::SetOperationalState
void SetOperationalState(bool ActiveFlag)
Definition
InputFPPRemote.cpp:378
c_InputFPPRemote::PlayNextFile
void PlayNextFile()
Definition
InputFPPRemote.cpp:181
c_InputFPPRemote::FppStopRemoteFilePlay
void FppStopRemoteFilePlay()
Definition
InputFPPRemote.cpp:653
c_InputFPPRemote::FppStartRemoteFilePlay
void FppStartRemoteFilePlay(String &FileName, uint32_t ElapsedTimeSec)
Definition
InputFPPRemote.cpp:639
c_InputFPPRemote::ProcessButtonActions
void ProcessButtonActions(c_ExternalInput::InputValue_t value)
Definition
InputFPPRemote.cpp:317
c_InputFPPRemote::FppSyncRemoteFilePlay
void FppSyncRemoteFilePlay(String &FileName, uint32_t ElapsedTimeMS)
Definition
InputFPPRemote.cpp:680
c_InputFPPRemote::pInputFPPRemotePlayItem
c_InputFPPRemotePlayItem * pInputFPPRemotePlayItem
Definition
InputFPPRemote.h:58
c_InputFPPRemote::Process
void Process()
Call from loop(), renders Input data.
Definition
InputFPPRemote.cpp:257
c_InputFPPRemote::AllowedToPlayRemoteFile
bool AllowedToPlayRemoteFile()
Definition
InputFPPRemote.cpp:722
c_InputFPPRemote::IsIdle
bool IsIdle()
Definition
InputFPPRemote.cpp:708
c_InputFPPRemote::Stopping
bool Stopping
Definition
InputFPPRemote.h:83
c_InputFPPRemote::validateConfiguration
void validateConfiguration()
Definition
InputFPPRemote.cpp:597
c_InputFPPRemote::~c_InputFPPRemote
virtual ~c_InputFPPRemote()
Definition
InputFPPRemote.cpp:79
c_InputFPPRemote::SendFppSync
bool SendFppSync
Definition
InputFPPRemote.h:80
c_InputFPPRemote::Poll
bool Poll()
Definition
InputFPPRemote.cpp:302
c_InputFPPRemote::Begin
void Begin()
set up the operating environment based on the current config (or defaults)
Definition
InputFPPRemote.cpp:92
c_InputFPPRemote::GetSyncOffsetMS
int32_t GetSyncOffsetMS()
Definition
InputFPPRemote.h:59
c_InputFPPRemote::FileBeingPlayed
char FileBeingPlayed[65]
Definition
InputFPPRemote.h:81
c_InputFPPRemote::ClearStatistics
void ClearStatistics()
Definition
InputFPPRemote.cpp:152
c_InputFPPRemote::FilePlayCount
uint32_t FilePlayCount
Definition
InputFPPRemote.h:85
c_InputFPPRemote::StopPlaying
void StopPlaying()
Definition
InputFPPRemote.cpp:393
c_InputFPPRemote::PlayingFile
bool PlayingFile()
Definition
InputFPPRemote.cpp:605
c_InputFPPRemote::StartPlayingRemoteFile
void StartPlayingRemoteFile(String &FileName)
Definition
InputFPPRemote.cpp:555
c_InputFPPRemote::GetSendFppSync
bool GetSendFppSync()
Definition
InputFPPRemote.h:60
c_InputFPPRemote::SetBlankTimerIsRunning
void SetBlankTimerIsRunning(bool BlankTimerRunning)
Definition
InputFPPRemote.cpp:759
c_InputFPPRemote::c_InputFPPRemote
c_InputFPPRemote(c_InputMgr::e_InputChannelIds NewInputChannelId, c_InputMgr::e_InputType NewChannelType, uint32_t BufferSize)
Definition
InputFPPRemote.cpp:58
c_InputFPPRemote::GetStatus
void GetStatus(JsonObject &jsonStatus)
Definition
InputFPPRemote.cpp:118
c_InputFPPRemote::SetBufferInfo
void SetBufferInfo(uint32_t BufferSize)
Definition
InputFPPRemote.cpp:338
c_InputFPPRemote::PlayingRemoteFile
bool PlayingRemoteFile()
Definition
InputFPPRemote.cpp:611
c_InputFPPRemote::SyncOffsetMS
int32_t SyncOffsetMS
Definition
InputFPPRemote.h:79
c_InputFPPRemote::save
void save()
Save configuration to File System.
c_InputFPPRemote::PlayerInfo
PlayerInfo_t PlayerInfo
Definition
InputFPPRemote.h:94
c_InputFPPRemote::GetConfig
void GetConfig(JsonObject &jsonConfig)
Get the current config used by the driver.
Definition
InputFPPRemote.cpp:103
c_InputFPPRemote::StartPlayingLocalFile
void StartPlayingLocalFile(String &FileName)
Definition
InputFPPRemote.cpp:474
c_InputFPPRemote::GetFppRemotePlayStatus
void GetFppRemotePlayStatus(JsonObject &jsonStatus)
Definition
InputFPPRemote.cpp:694
c_InputFPPRemote::ConfiguredFileToPlay
char ConfiguredFileToPlay[65]
Definition
InputFPPRemote.h:82
c_InputFPPRemote::load
void load()
Load configuration from File System.
c_InputFPPRemotePlayItem
Definition
InputFPPRemotePlayItem.hpp:26
c_InputMgr::e_InputType
e_InputType
Definition
InputMgr.hpp:73
c_InputMgr::e_InputChannelIds
e_InputChannelIds
Definition
InputMgr.hpp:40
c_InputFPPRemote::PlayerInfo_t
Definition
InputFPPRemote.h:89
c_InputFPPRemote::PlayerInfo_t::Player
byte Player[PlayerMemorySize]
Definition
InputFPPRemote.h:90
c_InputFPPRemote::PlayerInfo_t::InUse
bool InUse
Definition
InputFPPRemote.h:92
c_InputFPPRemote::PlayerInfo_t::Id
uint32_t Id
Definition
InputFPPRemote.h:91
include
input
InputFPPRemote.h
Generated by
1.12.0