This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::string CookLogger::processData(int32_t cook_event_id, grafana_event_data_t info_) { | |
switch (cook_event_id) { | |
case COOKING_EVENT_PROCESS_STARTED: | |
case COOKING_EVENT_PROCESS_CANCELLED: | |
case COOKING_EVENT_PROCESS_ENDED: { | |
grafana_event_data_t info = info_; | |
//printCookData(&info); | |
char *item_data; | |
item_data = json_asprintf("{event:%Q,cook_name:%Q,cook_type:%Q,event_time:%d,label:%Q, bottom_setting:%Q,bottom_temp:%d,bottom_time:%d,top_setting:%Q,top_temp:%d,top_time:%d}", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Modified from http://qiita.com/janus_wel/items/cfc6914d6b7b8bf185b6 | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (1) { | |
if (read) { | |
read = false; | |
for (channel = 0; channel < NUM_CHANNELS; channel++) { | |
adc_average[channel] += this->m_value[channel]; | |
} | |
count++; | |
if (count >= num_cycles) { | |
count = 0; | |
for (int index = 0; index < NUM_CHANNELS; index++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2010-2018 Antmicro | |
// Copyright (c) 2011-2015 Realtime Embedded | |
// | |
// This file is licensed under the MIT License. | |
// Full license text is available in 'licenses/MIT.txt'. | |
// | |
using System; | |
using System.Threading; | |
using System.Diagnostics; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Copyright (c) 2010-2018 Antmicro | |
// Copyright (c) 2011-2015 Realtime Embedded | |
// | |
// This file is licensed under the MIT License. | |
// Full license text is available in 'licenses/MIT.txt'. | |
// | |
using System; | |
using Antmicro.Renode.Peripherals.Bus; | |
using System.Collections.Generic; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "HttpServerHandler.h" | |
static const char* TAG = "HTTP-SERVER-HANDLER"; | |
namespace HttpServerHandler { | |
void readDeviceInfoHandler(HttpRequest* pHttpRequest, HttpResponse* pHttpResponse) | |
{ | |
ostringstream s1; | |
std::uint16_t voltage = 0; | |
std::int16_t avg_current = 0; | |
std::int16_t avg_power = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file main.c | |
* @author Locha Mesh Developers ([email protected]) | |
* @brief Main firmware file | |
* @version 0.1 | |
* @date 2020-02-02 | |
* | |
* @copyright Copyright (c) 2020 Locha Mesh project developers | |
* @license Apache 2.0, see LICENSE file for details | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2017 Freie Universität Berlin | |
* | |
* This file is subject to the terms and conditions of the GNU Lesser | |
* General Public License v2.1. See the file LICENSE in the top level | |
* directory for more details. | |
*/ | |
/** | |
* @defgroup net_gnrc_netif Network interface API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2013 Freie Universität Berlin. | |
* | |
* This file is subject to the terms and conditions of the GNU Lesser | |
* General Public License v2.1. See the file LICENSE in the top level | |
* directory for more details. | |
*/ | |
/** | |
* @defgroup net_if Network interfaces |
NewerOlder