## How can I identify this analog Nikon camera I came across in dads estate?

It’s definitely a Nikon SLR (single-lens reflex) camera, which takes interchangeable lenses.

I believe the camera body is a Nikon FE. Firstly, the serial number starts with “FE”. =) But also, comparing an FM to an FE (see Nikon FM/FE/FA, the first picture), yours looks like the FE.

The lens has a removable filter mounted on the front, a 52mm (diameter) L1BC Sky filter. Basically, it’s a UV filter. Nothing super special about it, it’s common to use UV filters on film cameras when shooting outdoors.

I can’t tell which lens is on the camera. It looks like it’s probably a 50mm f/1.8 AI-S lens, a common and standard Nikon lens at the time. Take off the lens cap, and look at the front of the lens. It might help to unscrew the UV filter. It should say something like “NIKKOR 50mm 1:1.8” followed by a serial number, and then “Nikon” further around.

## ca.classical analysis and odes – Quartic analog of the quadratic series of Au-Yeung

The identity
$$sumlimits_{n=1}^infty left (frac{H_n}{n}right)^2=frac{17}{4}zeta(4)=frac{17pi^4}{360},$$
where $$H_n=1+1/2+1/3+ldots 1/m$$ is the harmonic number, was discovered numerically by Enrico Auâ€“Yeung and proved rigorously by David Borwein and Jonathan Borwein (see https://rd.springer.com/article/10.1007%2Fs00283-021-10106-5).

What is known about its quartic counterpart (that is about the series $$sumlimits_{n=1}^infty left (H_n/nright)^4$$)?

Note that the cubic counterpart was considered in http://jca.ele-math.com/09-15/Evaluation-of-a-cubic-Euler-sum

## Matroid analog of Kneser’s theorem

What are the possible matroid analogs of Kneser’s theorem(or its linear version)?
This question can be formulated this way: If $$G$$ is a (finite) abelian group and $$M$$ is a matroid whose ground set is $$G$$, then what analogs we shall have for Kneser’s theorem in this setting?

## sound – Switching input to analog headset mic when plugged in

I’m trying to set up so that whenever I plug in my headset (one 1/8th-inch shared input/output jack) my computer switches sound input & output to use the headphones. Besides the headphones, I have a line out (speakers) an HDMI out (never used) and a USB webcam (always plugged in) with a built-in a microphone.

Booting without the headset, it always defaults to speakers output and webcam input (great). Behavior when plugging in the headset is inconsistent, but usually it will switch to use headset output and keep using the webcam input, until I manually change inputs. Everytime I plug the headset back in after changing input manually, I get the desired behavior (switching to headset inputs & outputs when plugged in).

I am basically looking for a way to do this automatically before connecting the headset so that it does this the first time as well.

I have a user `default.pa` file that sets the default source & sink to the headset source & sink. I’ve tried disabling `module-default-device-restore` and `module-switch-on-connect` with no luck. I thought it might have something to do with the port priority of the webcam being higher (8700) than that of the headset mic (8500), even though they’re on different sources, but changing the headset mic port priority to 8800 did not help. Any advice would be appreciated.

## platformer – How to detect taps vs tilts in analog stick input

I’m trying to implement a very simple Smash Bros style game using SDL2 and C++.

I’ve been trying to figure out how to handle analog stick inputs like Super Smash Bros. Melee and Rivals of Aether do. Specifically:

• Q. How to detect tilts vs taps (i.e. for dashing, etc.)?
• Q. Do I need to use input buffers / separate input buffers for analog sticks and face buttons?
• Q. Should I poll for input events or use a function that just returns the current stick position?
• Q. Polling for stick movement can result in a lot of analog stick change events. Should I consolidate them or just use the last event?

### Attempt #1

This is what I did originally:

• Poll for input events via SDL_PollEvent
• Update the game controller state with the latest input events
• The game controller state does not track order of input events
• The game controller state is designed to reflect the final state of the controller

As the game controller state is updated with new events, it calculates the change in stick position and determines if the player tapped/smashed the stick or not. This seems okay for simple cases, but we don’t know the order of inputs. I feel it can be done better.

### Attempt #2

I have also tried introducing an input buffer. Essentially, all of the input events are pushed into a ring buffer (button press events and analog stick events exist in the same buffer). The ring buffer is passed to a state machine that iterates over the events and updates the state. This implementation is what lead to this post.

### Other Info

I used the following for learning about SSBM:

Rivals of Aether appears to use an input buffer of 6 frames. So the game will result in a dash if the analog stick exceeds a certain threshold within that number of frames.

## sdl2 – Analog sticks, deadzones, diagonals, etc

I’m messing about with a knockoff PS3 controller and SDL2 on windows, and noticed that despite the circular restriction, when I position the stick as close as I can to an extreme diagonal, I am reading a max value for displacement on the X and Y axis. Now as a newbie, I would not exect this, as obviously in this posotion, the stick is some way from being as far displaced in either axis as it could be. So it seems that the region for min and max readings is a square whose limits are well within the full circular range of movement of the stick, and anything outside this region is deadspace.

I guess different controllers might have different exact sizes for eadspaces, but in general, is it the case that all analog controllers are going to exhibit this general behaviour?

## On **’Monitor of Built-in Audio Analog Stereo’** microphone, no device detected for sound input!

I realized that my new office computer (Ubuntu 18.04, the reason for mentioning ‘office computer’ is that I didn’t do the setup myself, was just handed it over) is not allowing input volume. While going to google meet, online mic testing, I found that this device has ‘Monitor of Built-in Audio Analog Stereo’ microphone but it was unable to capture any input sound. So I thought it might be muted and hence, went to Settings and in the slot of input sound, there was no device to be chosen as in the following picture:

How to solve this problem? Thanks in advance for help!

## c++ – Software driver for analog to digital converter

I have been developing a software driver for the internal a/d converter on this platform. The a/d converter peripheral is described in following document. The driver is written in C++ and is build upon existing driver which has been developed by the platform manufacturer in C language. The reason why I have decided to wrap existing driver into the C++ is that I would like to achieve a state where this driver constitutes a consistent hardware abstraction layer with my other drivers already written in C++.
During driver development I have had in my mind below given hardware schematic which describes how the internal a/d converter will be used in my application

As far as the driver design I have chosen following approach:

• I have decided to encapsulate the driver into a class `AdcInt` which offers an interface for
the a/d converter usage from the higher software layer. The intended usage of the driver is
following. After instantiation of the driver the `initialize` method is called. The `update` method
has to be called in periodic manner (e.g. from RTOS task) with appropriate period in respect to
the sampled physical quantities. As soon as the isReady method returns true the client code can start
reading a/d samples via `getValue` method or monitor alarm occurens via `isAlarmActive` method

• in respect to the fact that the a/d peripheral can be configured in rich manner I have decided to
define special class `AdcIntCfgManager` which manages this configuration i.e. it works upon the
`AdcIntCfg` struct (which is filled by the higher layer programmer) and offers set of methods
for retrieving the configuration data

``````#include "adc_int_cfg_manager.h"
#include "xsysmon.h"
#include <cstdint>

{
public:
enum class Input
{
kChannel00,
kChannel01,
kChannel02,
kChannel03,
kChannel04,
kChannel05,
kChannel06,
kChannel07,
kChannel08,
kChannel09,
kChannel10,
kChannel11,
kChannel12,
kNoChannels,
kOnChipTemp,
kVccInt,
kVccAux,
kVrefP,
kVrefN,
kVBram,
kVccPInt,
kVccPAux,
kVccOddr,
kNoInputs
};

void initialize();

void update();

bool getValue(Input input, float &var);

void handle_interrupt();

private:

{
public:

float _norm);

bool isEnabled();

float getValue();

void notify();

private:
uint16_t value;
float norm;
bool enabled;
};

class Sensor
{
public:
Sensor();

bool isEnabled();

float getValue();

void notify();

private:
uint16_t value;
bool enabled;
};

class Alarm
{
public:
Alarm();

bool isEnabled();

bool isActive();

void notify(uint32_t status);

private:
bool enabled;
bool active;
};

{
public:

private:
};

static const uint32_t NON_EXISTING_ALARM_ACTIVE_MASK = 0x00000000;
static const uint32_t NON_EXISTING_ALARM_DEACTIVE_MASK = 0x00000000;

static const uint32_t

static bool isEndOfSequenceInterrupt(uint32_t status);

static bool isAlarmInterrupt(uint32_t status);

static float temperatureRawToC(uint16_t raw_temp);

static uint16_t temperatureCToRaw(float temp);

static float voltageRawToV(uint16_t raw_voltage);

static uint16_t voltageVToRaw(float voltage);

Sensor sensors(static_cast<uint8_t>(

void startConversion();

bool isBusy();

void configureCalibration();

void configureAlarms();

void configureOperMode();

void configureInterrupts();

void initializeSensors();

void initializeAlarms();

void notifySensors();

void notifyAlarms(uint32_t status);

};

#include <iostream>

using namespace std;

XSM_SEQ_CH_TEMP,    XSM_SEQ_CH_VCCINT,  XSM_SEQ_CH_VCCAUX,
XSM_SEQ_CH_VREFP,   XSM_SEQ_CH_VREFN,   XSM_SEQ_CH_VBRAM,
XSM_SEQ_CH_VCCPINT, XSM_SEQ_CH_VCCPAUX, XSM_SEQ_CH_VCCPDRO};

XSM_ATR_TEMP_UPPER,    XSM_ATR_VCCINT_UPPER,  XSM_ATR_VCCAUX_UPPER,
XSM_ATR_OT_UPPER,      XSM_ATR_TEMP_LOWER,    XSM_ATR_VCCINT_LOWER,
XSM_ATR_VCCAUX_LOWER,  XSM_ATR_OT_LOWER,      XSM_ATR_VBRAM_UPPER,
XSM_ATR_VCCPINT_UPPER, XSM_ATR_VCCPAUX_UPPER, XSM_ATR_VCCPDRO_UPPER,
XSM_ATR_VBRAM_LOWER,   XSM_ATR_VCCPINT_LOWER, XSM_ATR_VCCPAUX_LOWER,
XSM_ATR_VCCPDRO_LOWER};

XSM_CH_TEMP,  XSM_CH_VCCINT,   XSM_CH_VCCAUX,  XSM_CH_VREFP,  XSM_CH_VREFN,
XSM_CH_VBRAM, XSM_CH_VCCLPINT, XSM_CH_VCCPAUX, XSM_CH_VCCPDRO};

{
configuration_manager = _configuration_manager;
}

{
int oper_result;

cout << "xadc device id hasn't been found" << endl;
} else {
oper_result =
if (oper_result != XST_SUCCESS) {
cout << "xadc driver initialization failed" << endl;
} else {
if (oper_result != XST_SUCCESS) {
cout << "xadc sequencer channels configuration failed" << endl;
} else {
configuration_manager->getClkDivRatio());
configuration_manager->getNoAveragedSamples());
if (oper_result != XST_SUCCESS) {
cout << "xadc settling time configuration failed" << endl;
} else {
configureCalibration();
configureAlarms();
configureOperMode();
initializeSensors();
initializeAlarms();
configureInterrupts();
}
}
}
}
}

{
if (isBusy() == false) {
startConversion();
}
}

{
for (AnalogInput &input : analog_inputs) {
return false;
}
}

for (Sensor &sensor : sensors) {
return false;
}
}
return true;
}

{
if (static_cast<uint8_t>(input) < static_cast<uint8_t>(Input::kNoChannels)) {
} else if ((static_cast<uint8_t>(input) >
static_cast<uint8_t>(Input::kNoChannels)) &&
(static_cast<uint8_t>(input) <
static_cast<uint8_t>(Input::kNoInputs))) {
uint8_t sensor_index = static_cast<uint8_t>(input) -
static_cast<uint8_t>(Input::kNoChannels) - 1;
return getOnChipSensorValue(
} else {
return false;
}
}

{
return alarms(static_cast<uint8_t>(alarm)).isActive();
}

{

if (isEndOfSequenceInterrupt(status)) {
notifySensors();
} else if (isAlarmInterrupt(status)) {
notifyAlarms(status);
}
}

{
value = 0;
enabled = false;
}

bool _enable, float _norm)
{
enabled = _enable;
norm = _norm;
}

{
return enabled;
}

{
return (value / 4096.0 * norm);
}

{
}

{
if (enabled) {
}
}

{
value = 0;
enabled = false;
}

bool _enable,
{
type = _type;
enabled = _enable;
}

{
return enabled;
}

{
float ret_val;

ret_val = voltageRawToV(value);
} else if (type == AdcIntCfgManager::OnChipSensorType::kTemperatureSensor) {
ret_val = temperatureRawToC(value);
}

return ret_val;
}

{
}

{
if (enabled) {
}
}

{
active = false;
enabled = false;
}

{
enabled = _enable;
}

{
return enabled;
}

{
return active;
}

{
if (enabled) {
active = true;
} else if (status & deactivate_mask) {
active = false;
}
}
}

{
}

{
}
}

{
}

{
}

{
}

{
bool enabled = false;
uint8_t index = static_cast<uint8_t>(channel);
if (analog_inputs(index).isEnabled()) {
var = analog_inputs(index).getValue();
enabled = true;
}
return enabled;
}

float &var)
{
bool enabled = false;
uint8_t index = static_cast<uint8_t>(sensor);
if (sensors(index).isEnabled()) {
var = sensors(index).getValue();
enabled = true;
}
return enabled;
}

{
return true;
} else {
return false;
}
}

{
return true;
} else {
return false;
}
}

{
// see ug480 on page 33
return ((raw_temp * 503.975) / 4096.0 - 273.15);
}

{
// see ug480 on page 33
return (4096.0 * (temp + 273.15) / 503.975);
}

{
// see ug480 on page 34
return (raw_voltage * 3.0 / 4096.0);
}

{
// see ug480 on page 34
return (voltage * 4096.0 / 3.0);
}

{
// disable sequencer before configuration (please see the xsysmon_extmux_example.c from Xilinx)
return oper_result;
}

{
int oper_result = XST_SUCCESS;
if (configuration_manager->isIncreasedSettlingTimeEnabled()) {
}
return oper_result;
}

{
}

{

for (uint8_t alarm = 0;
alarm++) {
if (configuration_manager->isAlarmEnabled(
}
}
}

{
float threshold;
uint16_t raw_threshold;

threshold = configuration_manager->getAlarmThresholdLower(alarm);
if (configuration_manager->getAlarmType(alarm) ==
raw_threshold = temperatureCToRaw(threshold);
} else if (configuration_manager->getAlarmType(alarm) ==
raw_threshold = voltageVToRaw(threshold);
}
}

{
float threshold;
uint16_t raw_threshold;

threshold = configuration_manager->getAlarmThresholdUpper(alarm);
if (configuration_manager->getAlarmType(alarm) ==
raw_threshold = temperatureCToRaw(threshold);
} else if (configuration_manager->getAlarmType(alarm) ==
raw_threshold = voltageVToRaw(threshold);
}
}

{
// external multiplexer connection
// single pass mode of operation
}

{
*this);
}

{
for (uint8_t input = 0;
input++) {
analog_inputs(input).initialize(
configuration_manager->isChannelEnabled(
configuration_manager->getChannelNorm(
}
}

{
for (uint8_t sensor = 0;
sensor <
sensor++) {
sensors(sensor).initialize(
configuration_manager->isOnChipSensorEnabled(
configuration_manager->getSensorType(
}
}

{
for (uint8_t alarm = 0;
alarm++) {
alarms(alarm).initialize(
configuration_manager->isAlarmEnabled(
}
}

{
for (Sensor &sensor : sensors) {
sensor.notify();
}
}

{
for (Alarm &alarm : alarms) {
alarm.notify(status);
}
}

{

if (configuration_manager->isCalibrationEnabled()) {
}

for (uint8_t sensor = 0;
sensor <
sensor++) {
if (configuration_manager->isOnChipSensorEnabled(
}
}

// external multiplexer connection

}

{

for (uint8_t calibration = 0;
calibration <
calibration++) {
if (configuration_manager->isCalibrationTypeEnabled(
}
}

}

{

for (uint8_t alarm = 0;
alarm++) {
if (configuration_manager->isAlarmEnabled(
}
}

}

{
configuration_manager->getAlarmLowerThresholdName(alarm))));
}

{
configuration_manager->getAlarmUpperThresholdName(alarm))));
}

{
}

{
}

{
for (uint8_t alarm = 0;
alarm++) {
if (configuration_manager->isAlarmEnabled(
}
}
}

{
}
``````

``````#include <cstdint>

{
public:
enum class Channel {
kChannel00,
kChannel01,
kChannel02,
kChannel03,
kChannel04,
kChannel05,
kChannel06,
kChannel07,
kChannel08,
kChannel09,
kChannel10,
kChannel11,
kChannel12,
kNoChannels
};

enum class OnChipSensor {
kOnChipTemp,
kVccInt,
kVccAux,
kVrefP,
kVrefN,
kVBram,
kVccPInt,
kVccPAux,
kVccOddr,
kNoOnChipSensors
};

enum class ChannelType { kUnipolar, kBipolar };

enum class ChannelEnable { kChannelDisabled, kChannelEnabled };

struct ChannelCfg
{
Channel channel;
ChannelType type;
ChannelEnable enable;
float norm;
};

};

enum class OnChipSensorType { kVoltageSensor, kTemperatureSensor };

enum class OnChipSensorEnable { kSensorDisabled, kSensorEnabled };

struct OnChipSensorsCfg
{
OnChipSensor sensor;
OnChipSensorType type;
OnChipSensorEnable enable;
};

enum class Averaging {
kAveragingFrom_0_Samples,
kAveragingFrom_16_Samples,
kAveragingFrom_64_Samples,
kAveragingFrom_256_Samples
};

enum class Calibration {
kSupplySensorOffsetCorrection,
kSupplySensorOffsetGainCorrection,
kNoCalibrations
};

enum class CalibrationEnable { kCalibrationDisabled, kCalibrationEnabled };

struct CalibrationCfg
{
Calibration calibration;
CalibrationEnable enable;
};

enum class Alarm {
kOverTemperature,
kOnChipTemperature,
kVccInt,
kVccAux,
kVBram,
kVccPInt,
kVccPAux,
kVccOddr,
kNoAlarms
};

enum class AlarmType { kTemperatureAlarm, kVoltageAlarm };

enum class AlarmEnable { kAlarmDisabled, kAlarmEnabled };

enum class AlarmThresholdName {
kOnChipTemperatureUpper,
kVccIntUpper,
kVccAuxUpper,
kOverTemperatureSet,
kOnChipTemperatureLower,
kVccIntLower,
kVccAuxLower,
kOverTemperatureReset,
kVBramUpper,
kVccPIntUpper,
kVccPAuxUpper,
kVccOddrUpper,
kVBramLower,
kVccPIntLower,
kVccPAuxLower,
kVccOddrLower,
kNoAlarmThresholdNames
};

struct AlarmThreshold
{
AlarmThresholdName name;
float value;
};

struct AlarmsCfg
{
Alarm alarm;
AlarmType type;
AlarmEnable enable;
AlarmThreshold lower_threshold;
AlarmThreshold upper_threshold;
};

{
ChannelCfg channels_cfg(static_cast<uint8_t>(
Channel::
kNoChannels));
OnChipSensorsCfg sensors_cfg(static_cast<uint8_t>(
OnChipSensor::kNoOnChipSensors));
clock_div_ratio;
SettlingTime settling_time;
Averaging averaging;
CalibrationCfg calibration_cfg(static_cast<uint8_t>(
Calibration::kNoCalibrations));
AlarmsCfg alarms_cfg(static_cast<uint8_t>(
Alarm::
kNoAlarms));
};

uint8_t getClkDivRatio();

bool isIncreasedSettlingTimeEnabled();

uint8_t getNoAveragedSamples();

bool isCalibrationEnabled();

bool isCalibrationTypeEnabled(Calibration type);

bool isAlarmEnabled(Alarm alarm);

float getAlarmThresholdLower(Alarm alarm);

float getAlarmThresholdUpper(Alarm alarm);

AlarmType getAlarmType(Alarm alarm);

AlarmThresholdName getAlarmLowerThresholdName(Alarm alarm);

AlarmThresholdName getAlarmUpperThresholdName(Alarm alarm);

bool isChannelEnabled(Channel channel);

ChannelType getChannelType(Channel channel);

float getChannelNorm(Channel channel);

bool isOnChipSensorEnabled(OnChipSensor sensor);

OnChipSensorType getSensorType(OnChipSensor sensor);

private:

};

{
configuration = _configuration;
}

{
return static_cast<uint8_t>(configuration->clock_div_ratio);
}

{
return (configuration->settling_time ==
}

{
return static_cast<uint8_t>(configuration->averaging);
}

{
bool ret_val = false;

for (uint8_t i = 0; i < static_cast<uint8_t>(Calibration::kNoCalibrations);
i++) {
if (configuration->calibration_cfg(i).enable ==
CalibrationEnable::kCalibrationEnabled) {
ret_val = true;
break;
}
}
return ret_val;
}

{
if (configuration->calibration_cfg(static_cast<uint8_t>(type)).enable ==
CalibrationEnable::kCalibrationEnabled) {
return true;
} else {
return false;
}
}

{
return (configuration->alarms_cfg(static_cast<uint8_t>(alarm)).enable ==
AlarmEnable::kAlarmEnabled);
}

{
return (configuration->alarms_cfg(static_cast<uint8_t>(alarm))
.lower_threshold.value);
}

{
return (configuration->alarms_cfg(static_cast<uint8_t>(alarm))
.upper_threshold.value);
}

{
return (configuration->alarms_cfg(static_cast<uint8_t>(alarm)).type);
}

{
return (configuration->alarms_cfg(static_cast<uint8_t>(alarm))
.lower_threshold.name);
}

{
return (configuration->alarms_cfg(static_cast<uint8_t>(alarm))
.upper_threshold.name);
}

{
if (configuration->channels_cfg(static_cast<uint8_t>(channel)).enable ==
ChannelEnable::kChannelEnabled) {
return true;
} else {
return false;
}
}

{
return (configuration->channels_cfg(static_cast<uint8_t>(channel)).norm);
}

{
return (configuration->channels_cfg(static_cast<uint8_t>(channel)).type);
}

{
if (configuration->sensors_cfg(static_cast<uint8_t>(sensor)).enable ==
OnChipSensorEnable::kSensorEnabled) {
return true;
} else {
return false;
}
}

{
return (configuration->sensors_cfg(static_cast<uint8_t>(sensor)).type);
}
``````

The intended usage of the driver is following:

• whole the configuration information are in the `FpgaPeripheralsCfg` class
• the instance of the AdcInt is along with instances of other drivers in the “container” `FpgaDrivers`

FpgaPeripheralsCfg

``````#include "adc_int_cfg_manager.h"

class FpgaPeripheralsCfg
{
public:

FpgaPeripheralsCfg() :
{
}

private:
.clock_div_ratio =
};
``````

``````#include "adc_int.h"

{
public:

void initialize(void);

private:
};

#include "fpga_drivers.h"

{
}

{
}
``````

main

``````int main(int argc, char** argv) {

FpgaPeripheralsCfg fpga_peripherals_cfg;
drivers.initialize();

}

return 0;
}
``````

I would like to ask you mainly for assessment of the whole driver design i.e. how the driver is divided into the C++ classes and how those classes interact.

## digital – A Camera that takes real photos without manipulation like old analog cameras

In modern digital cameras there are many settings which are applied automatically to the photos. And it does not always result in good ways. Recently I saw two photos of the same face one from a old analogue camera and the other a digital one.

The photos were considerably different and the one from analogue was much more close to the real face in every aspect.

So this is my question as I am not a pro in camera market:

Is there any model of digital cameras in the market in 2021 that takes photo like analogue cameras without manipulation and artificial improvements?

## object oriented – How to design software driver for the analog to digital converter?

I have been developing software driver for the analog to digital converter in C++. The a/d converter is primary intended for conversion of the temperature signals. The temperature signals are then used for the algorithms of temperature protections. My goal is to design the driver interface in such a manner that the driver can be used in the RTOS based application and also in the bare metal application.

Based on the above mentioned requirements I have designed the interface of the driver in this manner

So my intention is to use a sort of buffering of the samples of the analog signals in the internal array `analog_inputs`. The idea is that the client software calls the `initialize` method for initialization of the adc peripheral and then calls the `update` method from within a RTOS task or from timer interrupt service routine. The periodic call of the `update` method (which basically calls the `startConversion` method) results in periodic invoking of the `endOfConversionCallback` “behind the scene”. Here the `analog_inputs` array is filled by the samples. In case the `isReady` method returns true the `analog_inputs`array contains first samples of all the analog inputs and the client can start to access them via the `getRawValue` mehod call.

My question is whether you think that the approach which I have suggested above is suitable for my requirements or whether you see any potential problems in this approach?