/** * <summary> * Changes the type of synchronisation of the data logger. * <para> * Remember to call the <c>saveToFlash()</c> method of the module if the * modification must be kept. * </para> * <para> * </para> * </summary> * <param name="newval"> * either <c>YDataLogger.BEACONDRIVEN_OFF</c> or <c>YDataLogger.BEACONDRIVEN_ON</c>, according to the * type of synchronisation of the data logger * </param> * <para> * </para> * <returns> * <c>0</c> if the call succeeds. * </returns> * <para> * On failure, throws an exception or returns a negative error code. * </para> */ public int set_beaconDriven(int newval) { if (_func == null) { throw new YoctoApiProxyException("No DataLogger connected"); } if (newval == _BeaconDriven_INVALID) { return(YAPI.SUCCESS); } // our enums start at 0 instead of the 'usual' -1 for invalid return(_func.set_beaconDriven(newval - 1)); }
private void ConfigureYocto3d(string serial) { YQt q1 = YQt.FindQt(serial + ".qt1"); q1.set_logFrequency("25/s"); YQt q2 = YQt.FindQt(serial + ".qt2"); q2.set_logFrequency("25/s"); YQt q3 = YQt.FindQt(serial + ".qt3"); q3.set_logFrequency("25/s"); YQt q4 = YQt.FindQt(serial + ".qt4"); q4.set_logFrequency("25/s"); YDataLogger logger = YDataLogger.FindDataLogger(serial + ".dataLogger"); logger.set_recording(YDataLogger.RECORDING_OFF); logger.set_autoStart(YDataLogger.AUTOSTART_OFF); logger.set_beaconDriven(YDataLogger.BEACONDRIVEN_ON); logger.get_module().saveToFlash(); logger.forgetAllDataStreams(); System.Threading.Thread.Sleep(5000); MessageBox.Show("the Yocto-3D " + serial + " is now ready to record data"); }