Example #1
0
LedCounter::LedCounter( unsigned short countDigit, float distanceDigit, float sizeLed, float distanceLed, ci::ColorA colorOn, ci::ColorA colorOff )
: mActive( false )
, mLedDigits()
, mNumber( 0 )
, mDistanceDigit( distanceDigit )
{
	for( int i = 0; i < countDigit; i++ )
	{
		mLedDigits.push_back( LedDigit( sizeLed, distanceLed, colorOn, colorOff ));

		if( i < countDigit - 1 )
			mLedDigits[i].setShowNull( false );
	}
}
Example #2
0
LedTimer::LedTimer( float distanceDigit, float distanceSeparator, float sizeLed, float distanceLed, ci::ColorA colorOn, ci::ColorA colorOff )
: mActive( false )
, mRun( false )
, mDistanceDigit( distanceDigit )
, mDistanceSeparator( distanceSeparator )
, mLedSeparator( sizeLed, distanceLed, colorOn, colorOff )
, mSecondsAct( 0 )
, mSecondsMax( 0 )
, mTimer( 0 )
{
	mListener= std::shared_ptr<Listener>( new Listener());

	for( int i = 0; i < DIGIT_NUMBER; i++ )
	{
		mLedDigits[i] = LedDigit( sizeLed, distanceLed, colorOn, colorOff );
	}

	mLedDigits[0].setShowNull( false );
}