Skip to content

Commit

Permalink
Clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
frankosterfeld committed Sep 23, 2023
1 parent 74a247c commit ae3e392
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
6 changes: 3 additions & 3 deletions blocklib/picoscope4000a/picoscope4000a.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,7 @@ std::error_code Picoscope4000a::driver_initialize()
return {};
}

std::error_code Picoscope4000a::set_buffers(std::size_t samples,
uint32_t block_number)
std::error_code Picoscope4000a::set_buffers(std::size_t samples, uint32_t block_number)
{
for (auto& channel : state.channels) {
const auto aichan = convert_to_ps4000a_channel(channel.id);
Expand Down Expand Up @@ -588,7 +587,8 @@ std::error_code Picoscope4000a::driver_poll()
{
const auto status = ps4000aGetStreamingLatestValues(
state.handle,
static_cast<ps4000aStreamingReady>(gr::picoscope::detail::invoke_streaming_callback),
static_cast<ps4000aStreamingReady>(
gr::picoscope::detail::invoke_streaming_callback),
&_streaming_callback);
if (status == PICO_BUSY || status == PICO_DRIVER_FUNCTION) {
return {};
Expand Down
35 changes: 30 additions & 5 deletions blocklib/picoscope4000a/picoscope4000a.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ struct Picoscope4000a : public gr::picoscope::Picoscope<Picoscope4000a> {
fair::graph::OUT<float> values7;
fair::graph::OUT<float> errors7;

explicit Picoscope4000a(gr::picoscope::Settings settings = {}) : gr::picoscope::Picoscope<Picoscope4000a>(std::move(settings)) {}
explicit Picoscope4000a(gr::picoscope::Settings settings = {})
: gr::picoscope::Picoscope<Picoscope4000a>(std::move(settings))
{
}

fair::graph::work_return_status_t process_bulk(std::span<float> v0,
std::span<float> e0,
Expand All @@ -42,11 +45,17 @@ struct Picoscope4000a : public gr::picoscope::Picoscope<Picoscope4000a> {
std::span<float> v7,
std::span<float> e7) noexcept
{
return this->process_bulk_impl<8>({{{v0, e0}, {v1, e1}, {v2, e2}, {v3, e3}, {v4, e4}, {v5, e5}, {v6, e6}, {v7, e7}}});
return this->process_bulk_impl<8>({ { { v0, e0 },
{ v1, e1 },
{ v2, e2 },
{ v3, e3 },
{ v4, e4 },
{ v5, e5 },
{ v6, e6 },
{ v7, e7 } } });
}

std::make_signed_t<std::size_t>
available_samples(const Picoscope&) const noexcept
std::make_signed_t<std::size_t> available_samples(const Picoscope&) const noexcept
{
return this->available_samples_impl();
}
Expand All @@ -67,6 +76,22 @@ struct Picoscope4000a : public gr::picoscope::Picoscope<Picoscope4000a> {

} // namespace gr::picoscope4000a

ENABLE_REFLECTION(gr::picoscope4000a::Picoscope4000a, values0, errors0, values1, errors1, values2, errors2, values3, errors3, values4, errors4, values5, errors5, values6, errors6, values7, errors7);
ENABLE_REFLECTION(gr::picoscope4000a::Picoscope4000a,
values0,
errors0,
values1,
errors1,
values2,
errors2,
values3,
errors3,
values4,
errors4,
values5,
errors5,
values6,
errors6,
values7,
errors7);

#endif

0 comments on commit ae3e392

Please sign in to comment.