1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

adapt code style

This commit is contained in:
Manuel Pitz 2021-02-16 09:49:51 +01:00
parent 7f2b713714
commit ccad87b903
2 changed files with 4 additions and 44 deletions

View file

@ -377,7 +377,7 @@ public:
}
}
/** mem size needs to be equal to window size **/
/* mem size needs to be equal to window size */
void calcDft(paddingType padding, double *ringBuffer, uint ringBufferPos) {
//prepare sample window The following parts can be combined
@ -423,8 +423,9 @@ public:
+ 0.006947368 * cos(8 * M_PI * i / (window_size));
window_corretion_factor += filterWindowCoefficents[i];
}
}else if (window_type_in == windowType::HAMMING || window_type_in == windowType::HANN) {
double a_0 = 0.5;//this is the hann window
}
else if (window_type_in == windowType::HAMMING || window_type_in == windowType::HANN) {
double a_0 = 0.5; //this is the hann window
if (window_type_in == windowType::HAMMING)
a_0 = 25./46;

View file

@ -217,47 +217,6 @@ mosquitto_error:
return ret;
}
int mqtt_prepare(struct vnode *n){
int ret;
struct mqtt *m = (struct mqtt *) n->_vd;
if (m->username && m->password) {
ret = mosquitto_username_pw_set(m->client, m->username, m->password);
if (ret != MOSQ_ERR_SUCCESS)
goto mosquitto_error;
}
if (m->ssl.enabled) {
ret = mosquitto_tls_set(m->client, m->ssl.cafile, m->ssl.capath, m->ssl.certfile, m->ssl.keyfile, nullptr);
if (ret != MOSQ_ERR_SUCCESS)
goto mosquitto_error;
ret = mosquitto_tls_insecure_set(m->client, m->ssl.insecure);
if (ret != MOSQ_ERR_SUCCESS)
goto mosquitto_error;
}
ret = io_init(&m->io, m->format, &n->in.signals, (int) SampleFlags::HAS_ALL & ~(int) SampleFlags::HAS_OFFSET);
if (ret)
return ret;
ret = pool_init(&m->pool, 1024, SAMPLE_LENGTH(vlist_length(&n->in.signals)));
if (ret)
return ret;
ret = queue_signalled_init(&m->queue, 1024);
if (ret)
return ret;
return 0;
mosquitto_error:
warning("MQTT: %s", mosquitto_strerror(ret));
return ret;
}
int mqtt_parse(struct vnode *n, json_t *cfg)
{
int ret;