Jump to content

Chris A

QRC User
  • Content Count

    11
  • Joined

  • Last visited

  • Days Won

    1

Chris A last won the day on May 7 2015

Chris A had the most liked content!

Community Reputation

1 Neutral

About Chris A

  • Rank
    Poster
  1. Chris A

    Interact with App Icon

    When pressed, the App Hook button will send a message to connected Apps using the WbtBroadcastMessanger in the same manner the "Viewing Tuners" message is sent. To handle this, check for messages in your MessageCallback with the subject "AppHook". When found, fire a signal that will trigger a slot within your MainWindow if the recipient is that of your App. Below is some code to demonstrate this. // mainwindow.h // ... signals: void AppHookPressed(); private slots: void onAppHookPressed(); // mainwindow.cpp // In the constructor... connect( this, SIGNAL( AppHookPressed() ), this, SLOT( onAppHookPressed() ) ); // In the MessageCallback function... // Replace "App Name" in the if condition with the value of App_Name in your project's .pro file. MainWindow* window = ( (MainWindow*)data ); if( subject.compare( "AppHook" ) == 0 && recipient.compare( "App Name" ) == 0 ) { emit window->AppHookPressed(); } // Perform handling in onAppHookPressed()
  2. Chris A

    High Sample Rate Tuner Bandwidths

    Some time in the past we added more sophisticated validation within WbtSystem::updateTunerSettings(). Prior to that, an out of range sample rate would simply be passed along and adjusted farther down the chain, returning true within the API. The issue was that WbtSystem::updateTunerSettings() is meant to return true only if exactly what is defined in the provided RadioSettings was applied to the system, and return false if any setting was invalid. As such, the returning of true for an out of range sample rate was unexpected behavior and was corrected. There are plans in the near future to add more intelligent functions for handling Tuner settings that will allow for things such as automatic calculation of sample rate relative to bandwidth, but for the time being you will need to manually calculate your sample rate. It sounds like you're already on the right track in this regard. Using getMaxBandwidth is preferred, as not all systems are guaranteed to allow for a sample rate of 42. You can utilize WbtHelper::ClampFloat to restrict your sample rate in a convenient manner, passing getMinBandwidth, getMaxBandwidth, and your calculated sample rate to the function, and assigning the result back to your sample rate.
  3. Chris A

    will not reboot

    Within the folder /var/log on the WBT is a file called wbtd.log, which provides an ongoing log of the current WBT run. If the event holding up the system is being caught, this is where we'll see it. If you can, and this is assuming the network devices will start in this state, start the WBT and let it get stuck at the splash screen. Once there, copy the log file from the WBT using something like WinSCP and attach it to this thread so we can take a peek at it.
  4. Chris A

    Tuner bandwidths in v2.4

    The Session screen is displaying the Bandwidth rather than the sample rated. The bandwidth will generally be 9/10ths of the Sample rate except at the upper range where the Maximum Bandwidth forces that difference to be smaller. For example, a bandwidth of 9 MHz would have a calculated sample rate of 10 MHz. A sample rate of 40 MHz would calculate a sample rate of 44.444 MHz, but the max single tuner sample rate is 42, and so the sample rate is set to 42 MHz, the 2 MHz difference you see here.
  5. Chris A

    Tuner bandwidths in v2.4

    What getMinBandwidth and getMaxBandwidth are actually returning is the min and max sample rates, rather than the bandwidths. This is a known issue that will be fixed in a future release. To determine whether the Tuners are in combined mode, the best thing to do at the moment use WbtSystem::getTunerSettings() to get the current Radio Settings (WbtCommon::Data::RadioSettings). This contains the _combined member which holds the RF parameters of the combined mode. If the Center Frequency for combined mode is greater than 0, then you can safely say you are in combined mode. If it is not greater than 0, then you are not in combined mode.
  6. Chris A

    Detect Record press

    Yes, as of right now the App will be informed after the recording has started. It is not currently possible to intercept these events or change how they behave, though there is possibility of that functionality being added in the future. For now you may consider having your App providing it's own record button in which you do have control over parameters such as the name of the file.
  7. Chris A

    Detect Record press

    You'll need to set a StatusChanged callback for WbtApi::WbtStatus using the setStatusChangedCallback function. This will give you an updated WbtCommon::Data::WbtStatusData whenever the state of the WBT changes. The WbtStatusData object contains all the information you need to determine when the WBT has started a recording, not just via the record button, but by any means.
  8. Chris A

    Data access

    There are several methods for transferring files between the Internal Drives and other devices. 1 - Remove the Drive from the WBT and mount it to a PC for file transfer. Note that the WBT drives use the ext4 file system, and so you'll need software capable of accessing ext4 drives. This method has the advantage of freeing the WBT's drive bay for a fresh disk, allowing continuous record and playback. 2 - Connect to the WBT over a network via an SCP client, such as WinSCP, and transfer the desired files between the WBT and the local machine. 3 - Connect to the WBT over a network via a VNC client which supports file transfer, such as UltraVNC, and transfer the desired files between the WBT and the local machine. 4 - In the upcoming 2.4 firmware, file transfer will be possible directly on the WBT between connected external USB and eSATA drives via the File Manager.
  9. Chris A

    Data capacity & drive type

    All WBT models house two 2.5" SATA-III 6GB/sec hot-swappable drive bays. Most models are also shipped with two 960 GB Solid State Drives (SSD). Any commercially available 2.5" drive may be used with the WBT, though wider bandwidths will require higher sustained read/write speeds. More details are available on the WBT's Storage Specifications page. Additionally, the WBT sports two USB ports and one eSATA port (usable as USB) which can be used for transferring files between the WBT and external media, though they can not be recorded directly to or played directly from.
  10. Chris A

    Keypad, Timepad and Keyboard theme

    The Keyboard Tray and its siblings get their theme from the same style sheet as the rest of the widgets. This style sheet is acquired in one of two ways depending on the firmware version of the WBT in which your App is running. Both should be accounted for to ensure compatibility with the widest number of system configurations. Note: The following guide mimics the implementation utilized in 2.4.* versions of the API. First, ensure your App handles messages from the WBT Client using WbtApi::WbtBroadcastMessenger. You can view an example of this in 2.4 by creating a new Wbt App GUI project and examining the default code. This guide will assume your App has already set an appropriate Callback. Create 3 Signals and 3 Slots in your MainWindow class to handle theme related messages (shown below), each taking 1 QString as a parameter. Be sure to connect these in your constructor. Additionally, we'll want to create a QString that stores the location of the active resource files, as different themes will have different resource files. // mainwindow.h // ... signals: void ThemeChanged( QString ); void SetStyleSheet( QString ); void LoadResource( QString ); private slots: void onThemeChanged( QString theme ); void onSetStyleSheet( QString styleSheet ); void onLoadResource( QString resource ); private: QString m_resource // mainwindow.cpp // In the constructor... connect( this, SIGNAL( ThemeChanged( QString ) ), this, SLOT( onThemeChanged( QString ) ) ); connect( this, SIGNAL( SetStyleSheet( QString ) ), this, SLOT( onSetStyleSheet( QString ) ) ); connect( this, SIGNAL( LoadResource( QString ) ), this, SLOT(onLoadResource( QString ) ) ); // ... Next, emit the Signal which corresponds with the theme messages received in your Message Callback. // ... In the MessageCallback function if( subject.compare( "ThemeChanged" ) == 0 ) { // Handles Style messages from 2.3 emit window->ThemeChanged( QString::fromStdString( body ) ); } else if( subject.compare( "SetStyleSheet" ) == 0 ) { // Handles Style messages from 2.4 emit window->SetStyleSheet( QString::fromStdString( body ) ); } else if( subject.compare( "LoadResource" ) == 0 ) { emit window->LoadResource( QString::fromStdString( body ) ); } // ... Finally we needs to implement our slots, which will set the App wide style sheet and register the resource file. void MainWindow::onThemeChanged( QString theme ) { // 2.3 provides an address to the theme file, so we'll have to read the style sheet manually. QFile themeFile( theme ); if (!themeFile.open( QIODevice::ReadOnly | QIODevice::Text ) ) return; QString styleSheet = ""; QTextStream themeStream( &themeFile ); while( !themeStream.atEnd() ) { styleSheet += themeStream.readLine(); } setStyleSheet( styleSheet ); } void MainWindow::onSetStyleSheet( QString styleSheet ) { // 2.4 sends the actual style sheet, so all we need to do is set it. setStyleSheet( styleSheet ); } void MainWindow::onLoadResource( QString resource ) { // First we want to unregister the current resource file. QResource::unregisterResource( m_resource ); m_resource = resource; if( !QResource::registerResource( m_resource ) ) { qDebug() << "Failed to register" << m_resource; } } Assuming Widgets and Dialogs within the App have their parents properly assigned, the style sheet will propogate through the App, settings the style of all widgets and keyboards.
  11. Chris A

    Can the WBT Support 'playing audio'?

    Audio is an upcoming feature currently slated the WBT 2.3.3.* release, and will accessible to developers through utilization of the Advanced Linux Sound Architecture libraries. Once released, Users will simply connect their USB Audio device to any available port on the WBT, gaining access to whatever audio their favorite Apps are serving.
×