Template App Broken

Hello,

I just updated my Visual Studio to 2017, and now the C# template won't output the accelerometer data to the debug console. The only messages I'm getting are ones like this:

The thread 0x2638 has exited with code 0 (0x0).

Any help with this issue would be greatly appreciated.

Dan

Comments

  • Hi again,

    Just to add a little more information, I added print statement as seen below to see if this code was being run:

    private Fn_IntPtr accDataHandler = new Fn_IntPtr(pointer => {
                System.Diagnostics.Debug.WriteLine("I wonder if this will ever print.");
                Data data = Marshal.PtrToStructure<Data>(pointer);
                System.Diagnostics.Debug.WriteLine(Marshal.PtrToStructure<CartesianFloat>(data.value));
            });

    And it never printed during the running of the program.

    However, this print statement did execute every time I hit the start button:

    private void accStart_Click(object sender, RoutedEventArgs e)
            {
                IntPtr accSignal = mbl_mw_acc_get_acceleration_data_signal(cppBoard);

                mbl_mw_datasignal_subscribe(accSignal, accDataHandler);
                mbl_mw_acc_enable_acceleration_sampling(cppBoard);
                mbl_mw_acc_start(cppBoard);
                System.Diagnostics.Debug.WriteLine("Start button hit.");

            }
  • The C# template is working fine for me in VS2017.  Try placing a break point in accDataHandler and see if that is hit,
  • Hi Eric,

    I appreciate your always quick responses. Today the template is working just fine for me in VS 2017. I'm not sure what was going on yesterday, but it's all good now.

    Best,
    Dan
This discussion has been closed.