Skip to content

Instantly share code, notes, and snippets.

View arobicha's full-sized avatar

Adam Robichaud arobicha

View GitHub Profile
@arobicha
arobicha / EnableLogging.cpp
Last active January 14, 2025 16:42
Enabling Logging in DLAPI
#include <dlapi.h>
#include "DLAPIHelper.h"
using namespace dl;
int main()
{
// Instantiate the DLAPIHelper interface
DLAPI api;
#include <dlapi.h>
// For more details on using the dl::ISensor::Settings enum, see:
// https://cdn.diffractionlimited.com/dlapi/classdl_1_1_i_sensor.html#a1e12786d604def625b4ecffdbbdf8498
/*!
* \brief toggleStatusLED()
* \param pSensor pointer to your main camera sensor instance
* \param enable true to enable the status LED, false to disable it
* \returns true on success, false otherwise
#include <dlapi.h>
#include <chrono>
#include <thread>
#include <exception>
#include <iostream>
#include <memory>
#include <string>
#include <valarray>
@arobicha
arobicha / SampleFanSpeedControl.cpp
Last active March 6, 2023 18:02
Controlling DLAPI Fan Speed
#include <dlapi.h>
#include <stdexcept>
using namespace dl;
void handlePromise(IPromisePtr pPromise)
{
if (!pPromise) return;
auto result = pPromise->wait();
if (result != IPromise::Complete)