mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Merge remote-tracking branch 'remotes/origin/add_effect_engine' into add_effect_engine
Former-commit-id: 0b4fd4f95d601683433ae948f159347c34366eb4
This commit is contained in:
commit
0cac2ce916
@ -1,41 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Script for downloading and installing the latest Hyperion release
|
|
||||||
|
|
||||||
# Find out if we are on XBian
|
|
||||||
IS_XBIAN=`cat /etc/issue | grep XBian | wc -l`
|
|
||||||
|
|
||||||
# Make sure that the boblight daemon is no longer running
|
|
||||||
BOBLIGHT_PROCNR=$(ps -e | grep "boblight" | wc -l)
|
|
||||||
if [ $BOBLIGHT_PROCNR -eq 1 ];
|
|
||||||
then
|
|
||||||
echo 'Found running instance of boblight. Please stop boblight via XBMC menu before installing hyperion'
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Stop hyperion daemon if it is running
|
|
||||||
/sbin/initctl stop hyperion
|
|
||||||
|
|
||||||
# Get the Hyperion executable
|
|
||||||
wget -N https://raw.github.com/tvdzwan/hyperion/master/deploy/hyperiond -P /usr/bin/
|
|
||||||
chmod +x /usr/bin/hyperiond
|
|
||||||
|
|
||||||
# Get the Hyperion command line utility
|
|
||||||
wget -N https://raw.github.com/tvdzwan/hyperion/master/deploy/hyperion-remote -P /usr/bin/
|
|
||||||
chmod +x /usr/bin/hyperion-remote
|
|
||||||
|
|
||||||
# Copy the gpio changer (gpio->spi) to the /usr/bin
|
|
||||||
if [ $IS_XBIAN -eq 0 ]; then
|
|
||||||
wget -N https://raw.github.com/tvdzwan/hyperion/master/deploy/gpio2spi -P /usr/bin/
|
|
||||||
chmod +x /usr/bin/gpio2spi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy the service control configuration to /etc/int
|
|
||||||
if [ $IS_XBIAN -eq 0 ]; then
|
|
||||||
wget -N https://raw.github.com/tvdzwan/hyperion/master/deploy/hyperion.conf -P /etc/init/
|
|
||||||
else
|
|
||||||
wget -N https://raw.github.com/tvdzwan/hyperion/master/deploy/hyperion.xbian.conf -P /etc/init/ -O hyperion.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start the hyperion daemon
|
|
||||||
/sbin/initctl start hyperion
|
|
@ -364,7 +364,8 @@
|
|||||||
"/opt/hyperion/effects"
|
"/opt/hyperion/effects"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Bootsequence" :
|
|
||||||
|
"bootsequence" :
|
||||||
{
|
{
|
||||||
"effect" : "Rainbow swirl fast",
|
"effect" : "Rainbow swirl fast",
|
||||||
"duration_ms" : 3000
|
"duration_ms" : 3000
|
||||||
|
Binary file not shown.
1
deploy/hyperion.tar.gz.REMOVED.git-id
Normal file
1
deploy/hyperion.tar.gz.REMOVED.git-id
Normal file
@ -0,0 +1 @@
|
|||||||
|
e7d6f548d20e8a1dd817e4200fbedff8f7b042f9
|
@ -35,9 +35,6 @@ public slots:
|
|||||||
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
||||||
int runEffect(const std::string &effectName, const Json::Value & args, int priority, int timeout = -1);
|
int runEffect(const std::string &effectName, const Json::Value & args, int priority, int timeout = -1);
|
||||||
|
|
||||||
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
|
||||||
int runEffectScript(const std::string &script, const Json::Value & args, int priority, int timeout = -1);
|
|
||||||
|
|
||||||
/// Clear any effect running on the provided channel
|
/// Clear any effect running on the provided channel
|
||||||
void channelCleared(int priority);
|
void channelCleared(int priority);
|
||||||
|
|
||||||
@ -47,6 +44,10 @@ public slots:
|
|||||||
private slots:
|
private slots:
|
||||||
void effectFinished(Effect * effect);
|
void effectFinished(Effect * effect);
|
||||||
|
|
||||||
|
private:
|
||||||
|
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
||||||
|
int runEffectScript(const std::string &script, const Json::Value & args, int priority, int timeout = -1);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Hyperion * _hyperion;
|
Hyperion * _hyperion;
|
||||||
|
|
||||||
|
@ -157,13 +157,6 @@ public slots:
|
|||||||
/// @param timout The timeout of the effect (after the timout, the effect will be cleared)
|
/// @param timout The timeout of the effect (after the timout, the effect will be cleared)
|
||||||
int setEffect(const std::string & effectName, const Json::Value & args, int priority, int timeout = -1);
|
int setEffect(const std::string & effectName, const Json::Value & args, int priority, int timeout = -1);
|
||||||
|
|
||||||
/// Run the specified effect script on the given priority channel and optionally specify a timeout
|
|
||||||
/// @param script path of the effect script
|
|
||||||
/// @param args arguments of the effect script
|
|
||||||
/// @param priority The priority channel of the effect
|
|
||||||
/// @param timout The timeout of the effect (after the timout, the effect will be cleared)
|
|
||||||
int setEffectScript(const std::string &script, const Json::Value &args, int priority, int timeout);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static LedDevice * createDevice(const Json::Value & deviceConfig);
|
static LedDevice * createDevice(const Json::Value & deviceConfig);
|
||||||
static ColorOrder createColorOrder(const Json::Value & deviceConfig);
|
static ColorOrder createColorOrder(const Json::Value & deviceConfig);
|
||||||
|
@ -502,11 +502,6 @@ int Hyperion::setEffect(const std::string &effectName, const Json::Value &args,
|
|||||||
return _effectEngine->runEffect(effectName, args, priority, timeout);
|
return _effectEngine->runEffect(effectName, args, priority, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Hyperion::setEffectScript(const std::string &script, const Json::Value &args, int priority, int timeout)
|
|
||||||
{
|
|
||||||
return _effectEngine->runEffectScript(script, args, priority, timeout);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Hyperion::update()
|
void Hyperion::update()
|
||||||
{
|
{
|
||||||
// Update the muxer, cleaning obsolete priorities
|
// Update the muxer, cleaning obsolete priorities
|
||||||
|
@ -107,7 +107,11 @@ int main(int argc, char** argv)
|
|||||||
// if (retVal == 0)
|
// if (retVal == 0)
|
||||||
if (hyperion.setEffect(effectName, priority, duration_ms) == 0)
|
if (hyperion.setEffect(effectName, priority, duration_ms) == 0)
|
||||||
{
|
{
|
||||||
std::cout << "Boot sequence created and started" << std::endl;
|
std::cout << "Boot sequence(" << effectName << ") created and started" << std::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "Failed to start boot sequence: " << effectName << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user